فصل 24. Zend_Pdf

قائمة المحتويات

24.1. Introduction.
24.2. Creating and loading PDF documents.
24.3. Save changes to the PDF document.
24.4. Document pages.
24.5. Drawing.
24.5.1. Geometry.
24.5.2. Colors.
24.5.3. Shape Drawing.
24.5.4. Text Drawing.
24.5.5. Using fonts.
24.5.6. Image Drawing.
24.5.7. Line drawing style.
24.5.8. Fill style.
24.5.9. Rotations.
24.5.10. Save/restore graphics state.
24.5.11. Clipping draw area.
24.5.12. Styles.
24.6. Zend_Pdf module usage example.

24.1. Introduction.

Zend_Pdf module is a PDF (Portable Document Format) manipulation engine written entirely in PHP 5. It can load existing documents, create new, modify and save modified documents. Thus it can help any PHP-driven application dynamically prepare documents in a PDF by modifying existing template or generating document from a scratch. Zend_Pdf module supports the following features:

  • Create new document or load existing one. [3]

  • Retrieving specified revision of the document.

  • Manipulate pages within document. Changing page order, adding new pages, removing pages from a document.

  • Different drawing primitives (lines, rectangles, polygons, circles, ellipses and sectors).

  • Text drawing using any of the 14 standard (built-in) fonts or your own custom TrueType fonts.

  • Rotations.

  • Image drawing. [4]

  • Incremental PDF file update.



[3] PDF V1.4 (Acrobat 5) documents are supported for loading now.

[4] JPG, PNG [Up to 8bit+Alpha] and TIFF images are supported.