note 10998 modified in function.pdf-show-boxed by felipe
| From: | felipe@php.net | Date: | Tue, 22 Jul 2008 18:46:31 +0000 |
| Subject: | note 10998 modified in function.pdf-show-boxed by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142519@lists.php.net to get a copy of this message | ||
Here's a way to make a dynamic size text box for text coming from a database
<?php
$TextHeight = 10;
while ((pdf_show_boxed($pdf,$rstJobs["JobDetails"], 123, $varPosition,
308,$TextHeight,left,blind)) > 1) {
$TextHeight = $TextHeight + 10;
}
?>
pdf_show_boxed ($pdf, $rstJobs["JobDetails"], 123, $varPosition - $TextHeight + 10,
308,$TextHeight,left);
You will need to change the value of 10 to your font size.
this may not be the best way to do this so if you find a better way add it here!
--was--
Here's a way to make a dynamic size text box for text coming from a database
$TextHeight = 10;
while ((pdf_show_boxed($pdf,$rstJobs["JobDetails"], 123, $varPosition,
308,$TextHeight,left,blind)) > 1)
{
$TextHeight = $TextHeight + 10;
}
pdf_show_boxed ($pdf, $rstJobs["JobDetails"], 123, $varPosition - $TextHeight + 10,
308,$TextHeight,left);
You will need to change the value of 10 to your font size.
this may not be the best way to do this so if you find a better way add it here!
http://php.net/manual/en/function.pdf-show-boxed.php