PHP
  Home arrow PHP arrow Building 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

Building PDF Documents with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 12
    2007-10-30


    Table of Contents:
  • Building PDF Documents with PHP 5
  • Building basic PDF documents with PHP 5 using an object-oriented approach
  • Working with different page sizes
  • Creating a basic A5 PDF document using PHP 5

  • 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


    Building PDF Documents with PHP 5
    ( Page 1 of 4 )

    PHP is a versatile language with some surprising capabilities. It can even create PDF documents on the fly, with the right third-party PDF library. If you can't imagine why you'd want to do that, think about the various formats used by applications when retrieving data from databases -- and keep reading.

    Introduction

    As the enthusiastic PHP programmer that you surely are, you’ll certainly know that this mature server-side scripting language can be used in all sorts of clever ways to develop a huge variety of applications, including form validation systems, full-featured database abstraction layers, powerful error loggers, and so forth. And certainly, the list goes on and on.

    The flexibility and versatility offered by PHP is remarkable when it comes to building applications that will be used for different website development purposes. However, it isn’t my intention here to enumerate the thorough advantages of PHP. 

    Nonetheless, there’s one thing that I’d like to stress here with reference to the robust capabilities offered by PHP. As you probably heard, this powerful server-side scripting language has the venerable capacity (yes, that's the right adjective) for dynamically building PDF documents. This feature makes it suitable for use with web applications that deliver database contents in PDF files. 

    Of course, the ability to create PHP documents on the fly comes at a cost. PHP 5 currently doesn’t support this feature natively, which means that you'll need to download a third-party PDF library to start generating PDF files quickly. PHP’s official web site recommends the use of the popular PDFlib package, which offers support for multiple programming languages, such as Python, Perl, and naturally PHP. The down side to using this library is that you’ll have to pay a license to use it commercially.

    If you prefer, you can use an streamlined version of the PDFlib package, called “PDFlite,” but it lacks some important features which are present in the commercial version. In either case, you may want to first download this library (or another one of your choice), and then install it on your on testing server, and finally get started with building basic PDF documents directly from your PHP scripts.

    So, if creating dynamic PDF files with PHP 5 is an interesting topic to you, keep reading. In this series of articles I’ll show you how to start using the “PDFlib” package to build basic PDF documents. In upcoming articles I’ll cover other important characteristics, like including images into a PDF file, displaying blocks of text, and drawing basic shapes.

    Let’s not waste any more time in preliminaries. Click on the link below to start learning how to build dynamic PDF documents with PHP 5. Let’s begin now!



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

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





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