PHP
  Home arrow PHP arrow Working with Images and Text Flows in PDF Files 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

Working with Images and Text Flows in PDF Files with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2007-11-13


    Table of Contents:
  • Working with Images and Text Flows in PDF Files with PHP 5
  • Listing the source code of some previous examples
  • Displaying a basic image
  • Displaying a basic text flow

  • 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


    Working with Images and Text Flows in PDF Files with PHP 5
    ( Page 1 of 4 )

    When it comes to developing database-driven web applications that deliver their contents to end users in a great variety of formats, PHP can be a killer scripting language. This becomes even more evident when these contents must be displayed through one or more PDF files, which have to be built dynamically before being sent to the client. So if you want to learn how to start building PDF documents in PHP 5, then you should begin reading this article now!

    Welcome to the third article of the series that began with "Building PDF Documents with PHP 5." Composed of five approachable tutorials, this series takes you through using the most relevant methods that come packaged with the popular "PDFlib" library to create content-rich PDF files directly from inside your own PHP 5 scripts. It complements the corresponding theory with many educational code samples.

    Now that you know the subject of this series, I'm going to spend some time refreshing the topics that I covered in the previous tutorial. This will help you to establish an appropriate continuity between it and the current one that you're hopefully reading with interest.

    As you'll surely recall, in the second part of the series I showed you how to use a number of straightforward methods that come bundled with the aforementioned "PDFlib" package to build a few basic PDF documents that contained some basic texts. In this case, the text in question was distributed primitively across multiple lines by using a combination of the "set_text_pos()", "show()", and "continue_text()" methods respectively. This came in handy for performing some common tasks, such as specifying what X and Y coordinates should be used on the PDF document to display this text, and that it should be distributed in several chunks of strings.

    Of course, due to the easy learning curve offered by many of the methods included with the PDFlib library, performing the tasks from a simple PHP 5 script shouldn't be a major concern for you, and should be tackled with minimal hassles.

    So far, so good. At this point, you hopefully recall how to use the previous methods to display multiple lines of text in a concrete PDF file, so it's time to learn a few more method bundled with the library. As you'll see in the next few lines, these methods can be quite helpful for performing other tasks, like including images and blocks of texts into the PDF file in question.

    So, are you ready to find out how to incorporate graphics and blocks of strings into a specific PDF document with PHP 5? Well, let's not waste more time in preliminaries and begin this educational journey 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