note 93071 rejected from function.pdf-show-boxed by danbrown
| From: | danbrown@php.net | Date: | Fri, 21 Aug 2009 17:51:35 +0000 |
| Subject: | note 93071 rejected from function.pdf-show-boxed by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-159759@lists.php.net to get a copy of this message | ||
Note Submitter: f dot f dot smith1 at gmail dot com
----
Who do we contact to get parameter descriptions on these PDF functions?
I've learned from trial and error that the fourth parameter is not the "top" of the
box. It's more like the bottom.
It calculates the top by starting at "bottom" and adding on "height". Also, the
float values are typographical point sizes. IE. a height of 10 is 1 line of 10 point font. Found
this out the hard way too.
Try:
pdf_show_boxed ( resource $p , string $text , float $left , float $top , float $width , float
$height , string $mode , string $feature )
w/ the $text of 6 lines, $left = 36 (1/2" on letter sized paper), $width = 540 (7.5", so
it will stop have inch from the right side), $height = 60 (covers 6 lines of 10 pt. font), $mode =
"center", $feature = "". Adjust $top randomly (try, 600, 500, and 400).
You'll see the boxed paragraph drop on the page instead of remaining in one location (as one
would assume since the TOP line would be declared, NOT the BOTTOM).
If needed, I can create a test script to post and everyone can test it.