note 51435 added to function.pdf-begin-page

From: Date: Wed, 30 Mar 2005 21:12:51 +0000
Subject: note 51435 added to function.pdf-begin-page
Groups: php.notes 
Request: Send a blank email to php-notes+get-87215@lists.php.net to get a copy of this message
I spent a lot of hours tweaking numbers in my PDF source, trying to nudge things the right way, and, invariably, really messing up big-time... Then one day I realized that all these numbers were supposed to be (INCHES * 72). Now my PDF code looks more like: <?php . . . pdf_begin_page($pdf, 8.5 * 72, 11 * 72); . . /* set up $helvetica as font */ . pdf_set_font($pdf, $helvetica, 9); $leading = pdf_get_value($pdf, 'leading'); pdf_show_boxed($pdf, 0.5 * 72, 0.5 * 72, 4.0 * 72, $leading, 'left', ''); ?> 0.0, 0.0 is at the bottom left. 8.5 * 72, 11 * 72 is at the top right. Everything in between is in x.xx * 72 where x.xx is INCHES. Suddenly, I can visualize the PDF while I'm typing. Might work for you too. Sample linked from: http://l-i-e.com/resume.htm ---- Manual Page -- http://www.php.net/manual/en/function.pdf-begin-page.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51435 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51435&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51435&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51435&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51435&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51435&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51435&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87215) next »