note 68858 added to function.pdf-fit-textflow

From: Date: Sun, 13 Aug 2006 19:10:23 +0000
Subject: note 68858 added to function.pdf-fit-textflow
Groups: php.notes 
Request: Send a blank email to php-notes+get-115870@lists.php.net to get a copy of this message
This is an excerpt of code from the PDFlib Manual that has been modfied for PHP. It fulfills the very common need to have a textflow extend accross multiple pages. $pdf is the PDF file resource. You may want to modify the page size (this is letter size) or the position of the textflow itself. <?php $thetext = "INSERT YOUR MULTI-PAGE TEXT HERE"; $textflow = PDF_create_textflow($pdf, $thetext, "fontname=Tahoma fontsize=9 encoding=winansi"); do { PDF_begin_page_ext($pdf, 612, 792, ""); $result = PDF_fit_textflow($pdf, $textflow, 50, 120, 550, 720, ""); PDF_end_page_ext($pdf, ""); } while (strcmp($result, "_stop")); PDF_delete_textflow($pdf, $textflow); ?> If you have any templates or pagination that need to be placed on each page, they can go within the do/while loop itself, between the begin_page and end_page functions. ---- Server IP: 216.235.15.211 Probable Submitter: 209.217.70.194 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.pdf-fit-textflow.php Edit -- https://master.php.net/note/edit/68858 Del: integrated -- https://master.php.net/note/delete/68858/integrated Del: useless -- https://master.php.net/note/delete/68858/useless Del: bad code -- https://master.php.net/note/delete/68858/bad+code Del: spam -- https://master.php.net/note/delete/68858/spam Del: non-english -- https://master.php.net/note/delete/68858/non-english Del: in docs -- https://master.php.net/note/delete/68858/in+docs Del: other reasons-- https://master.php.net/note/delete/68858 Reject -- https://master.php.net/note/reject/68858 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115870) next »