PHP
  Home arrow PHP arrow Positioning Strings with the show_xy() Method in PDF Documents with PHP 5
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Positioning Strings with the show_xy() Method in PDF Documents with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 4
    2007-11-27


    Table of Contents:
  • Positioning Strings with the show_xy() Method in PDF Documents with PHP 5
  • Inserting Blocks of Text
  • Going One Step Further
  • Completion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Positioning Strings with the show_xy() Method in PDF Documents with PHP 5
    ( Page 1 of 4 )

    As you know, more and more web sites try to engage their visitors by delivering their database contents in several formats, such as Adobe’s Portable Document Format (PDF). The good news regarding this topic is that you, as a PHP developer, can take advantage of this language’s versatility and get started quickly building PDF files directly from your own scripts.

    Welcome to the final installment of the series that began with “Building PDF Documents with PHP 5.” Composed of five educational tutorials, this series provides you with a friendly introduction to using the most important methods that come packaged with the popular “PDFlib” library and to performing some tasks associated with PDF files, such as creating and deleting documents on the fly, inserting blocks of texts and images, and working with single and multi-line strings.

    Having introduced you to the subject covered by this group of articles, it’s time to recapitulate briefly the topics that were discussed in the previous tutorial of the series. This way you’ll be able to see more easily how that article and the current one can link with each other.

    Getting straight to the point, hopefully you’ll recall that in the previous article I showed you how to use the helpful “rect()” method which comes integrated with the “PDFlib” package to draw some basic rectangles on a given sample PDF file.

    Indeed, as you saw for yourself, incorporating primitive shapes like the pertinent rectangles to an existing PDF file is an easy-to-follow process. It’s only limited to creating an instance of the already familiar “PDFlib” class that I used with all of the hands-on examples that you learned so far, and calling the adequate method responsible for drawing a specific shape.

    Nevertheless, regardless of the ease with which the “PDFlib” library can be used to perform different tasks, like drawing different shapes, inserting images, and so forth, undoubtedly the king of all of them is working with text. In truth, one of the most common challenges that an average PHP developer has to tackle when building PDF files from scratch consists of creating PDF documents whose contents are mostly composed of simple text.

    Considering this fact, this last installment of the series will be entirely focused on using a handy method that naturally belongs to the “PDFlib” library, called “show_xy()”, which allows you to display complete blocks of text at different positions within a given PDF document, by using only a couple of X,Y coordinates.

    So, are you ready to learn how to use the “show_xy()” method to create text-based PDF files? Well, let’s not waste more time in preliminaries and begin now!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Using Directory Iterators to Build Loader Ap...
    - Using the spl_autoload() Functions to Build ...
    - Working Out of the Object Context to Build L...
    - Using the _autoload() Magic Function to Buil...
    - The Destruct Magic Function in PHP 5
    - The Autoload Magic Function in PHP 5
    - Developing a Recursive Loading Class for Loa...
    - The Sleep and Wakeup Magic Functions in PHP 5
    - Using the Clone Magic Function in PHP 5
    - Including Files Recursively with Loader Appl...
    - The Call Magic Function in PHP 5
    - Designing a Captcha System with PHP and MySQL
    - Using Static Methods to Build Loader Apps in...
    - The Isset and Unset Magic Functions in PHP 5
    - Advanced PHP Form Input Validation to Check ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT