note 92268 added to function.pdf-info-textline

From: Date: Thu, 16 Jul 2009 23:18:00 +0000
Subject: note 92268 added to function.pdf-info-textline
Groups: php.notes 
Request: Send a blank email to php-notes+get-158388@lists.php.net to get a copy of this message
You can use PDF_info_textline to center some text in the page. Here's a little function // Parameters: // $p -> the PDF handle // $text -> the text to center // $posy -> the vertical position of the text // $pageWidth -> the width of the page, defaults to 595 (A4) function center_text($p, $text, $posy, $pageWidth=595) { $width = PDF_info_textline($p, $text, 'width', ''); PDF_fit_textline($p, $text, ($pageWidth-$width)/2, $posy, ''); } ---- Server IP: 89.31.146.176 Probable Submitter: 79.87.9.182 ---- Manual Page -- http://www.php.net/manual/en/function.pdf-info-textline.php Edit -- https://master.php.net/note/edit/92268 Del: integrated -- https://master.php.net/note/delete/92268/integrated Del: useless -- https://master.php.net/note/delete/92268/useless Del: bad code -- https://master.php.net/note/delete/92268/bad+code Del: spam -- https://master.php.net/note/delete/92268/spam Del: non-english -- https://master.php.net/note/delete/92268/non-english Del: in docs -- https://master.php.net/note/delete/92268/in+docs Del: other reasons-- https://master.php.net/note/delete/92268 Reject -- https://master.php.net/note/reject/92268 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#158388) next »