excudo pdf textblock
This example should look more or less familiar if you are used to work with Zend PDF
<?php
require_once 'Excudo_Pdf.php';
require_once 'Excudo_Pdf_Page.php';
require_once 'Excudo_Pdf_Textblock.php';
$pdf = new Excudo_Pdf();
// Add new page generated by Zend_Pdf object (page is attached to the specified document)
$pdf->pages[] = ($page1 = $pdf->newPage('A4'));
// Create new font
$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
// Apply font and draw text
$page1->setFont($font, 12);
$someVarHoldingLargeString = "this is some text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text and this is some more text";
$eptb = new Excudo_Pdf_Textblock($font, 12);
// passing large string
$eptb->createBlock($someVarHoldingLargeString, 500);
// setting alignment
$eptb->setAlignment(Excudo_Pdf_Textblock::ALIGN_JUSTIFY);
// outputing, and saving height
$height = $eptb->drawText($page1, 10, 500);
// saving the pdf file
$pdf->save('test.pdf');
?>