PHP
  Home arrow PHP arrow Constructing Multi-Line 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

Constructing Multi-Line PDF Documents with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2007-11-06


    Table of Contents:
  • Constructing Multi-Line PDF Documents with PHP 5
  • Review: building basic PDF documents using PHP 5
  • Displaying multiple lines of text on a single PDF document
  • Building a multi-line PDF document using the set_text_pos() method

  • 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


    Constructing Multi-Line PDF Documents with PHP 5
    ( Page 1 of 4 )

    If you’re a PHP developer interested in developing web applications that deliver the contents of their database tables in PDF format, then hopefully this group of articles will be what you’re looking for. Welcome to the second article of the series “Building PDF documents with PHP 5.” Composed of five instructive tutorials, this series shows you the basics for creating PDF files directly from your own PHP 5 scripts, and complements the theoretical concepts with copious hands-on examples.

    Having introduced you to the main subject of this series, now let me refresh your memory of the topics that were discussed in the previous tutorial. In that article, we learned that creating primitive PDF documents using PHP is a process that’s reduced to spawning a new instance of the “PDFlib” class that comes bundled with the popular “PDFLib” library, and then calling one or more of its pertinent methods to open a new PDF document and a page, which usually need to include some basic contents in them, like text strings and images as well.

    With regard to specifying the dimensions of the PDF page that will be used for constructing the corresponding document, the “PDFLib” package offers the handy “begin_page_ext()” method. It's useful for creating PDF pages of different sizes, including some popular formats, like A3, A4, and A5.

    In addition, you saw how to include some basic texts into several PDF files by using a combination of the “set_text_pos()” and “show()” methods. Naturally these are packaged with the “PDFLib” library. In this way you learned some of the most common tasks associated with the creation of PDF files.

    However, to be frank, I'm just starting to scratch the surface when it comes to building PDF files with PHP 5. There are many other helpful methods, provided by aforementioned “PDFLib” package. Thus, in this second part of the series I’ll provide you with some examples that illustrate how to build PDF files that contain multiple lines of text; remember,  in the preceding article I worked only with single-line strings. Additionally, I'll teach you how to position these texts on a given PDF page.

    With the preliminaries out of the way, it’s time to continue learning more about building PDF files with PHP 5. Let’s go!



     
     
    >>> 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 6 hosted by Hostway
    Stay green...Green IT