Saturday, February 06, 2010

Create PDF on iseries spooled files using Zend_PDF and i5 Toolkit for PHP

Zend_Pdf is a PDF manipulation framework for PHP available on iseries via the Zend Core. It can help any PHP application dynamically create or modify PDF documents.

Zend_Pdf offers the following features:
Create or load documents
Manipulate pages within a document
Drawing lines, rectangles, polygons, circles, ellipses and sectors, images and rotations
Use of the 14 built-in fonts or TrueType fonts.


include the Zend.pdf framework in your PHP code:
require_once 'Zend/Pdf.php'

Create a PDF class, an instance of the Zend_Pdf object:

$pdf = new Zend_Pdf();

A document can be loaded from a file using the instance:
$pdf = Zend_PDF::load($filename);

Changes to the PDF document can be saved:
$pdf->save($filename, true);

Zend Core for i5/OS includes the i5 Toolkit for PHP. This gives access to i5 function from PHP. i5_spool allows administration of spool files. 


Combining this with Zend_PDF will give iseries and i5/os users free coversion of spooled files to PDFs

No comments:

Post a Comment