Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Web Architecture : Education - Tutorials
Writing efficient PHP
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
5. Other performance enhancements
  


Reviewing dynamic generation of PDF files page 6 of 8


If your application dynamically produces PDF files using ClibPDF, PDFLib or similar, consider the following:

  • Is a proportional or fixed font appropriate for the information?

    When you use a proportional font, correct alignment of numbers requires calls to functions such as pdf_stringwidth to get the width of a number to compute the coordinates of the left-hand side of the number. Such calls often are made many times throughout the generation of a PDF file, and can add up. An alternative approach, though possibly less acceptable to users, would be to use a fixed font such as Courier. You can more easily keep track of the text positions within your own code.

  • Is it absolutely necessary to output reports in PDF or is an HTML format sufficient?

    HTML can be generated much more quickly. Perhaps users would be happy with an HTML format report for on-line viewing and then, only if a printable or print-friendly report is required, generate a PDF file.

  • Just how timely and dynamic do the these reports need to be?

    Reconsider the business case for having these reports. You might be able to batch generate some commonly-requested reports, perhaps nightly, and make them directly available through a hyperlink.


Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact