Home »
FUDforum Development »
Bug Reports »
PDF Generation & PHP 4.3.8 / PECL Package pdflib 2.0.2
PDF Generation & PHP 4.3.8 / PECL Package pdflib 2.0.2 [message #19959] |
Sun, 19 September 2004 21:58  |
jmccombs
 Messages: 8 Registered: September 2004 Location: Northern Virginia
Karma: 0
|
Junior Member |
|
|
Ran into a problem when I had pdf generation enabled. Seems that PDFs weren't being generated properly.
Errors were:
Warning: pdf_add_bookmark() expects exactly 4 parameters, 2 given in /portal/solutions/www/forum/fud/pdf.php on line 95
Warning: pdf_stringwidth() expects exactly 4 parameters, 2 given in /portal/solutions/www/forum/fud/pdf.php on line 157
Warning: pdf_stringwidth() expects exactly 4 parameters, 2 given in /portal/solutions/www/forum/fud/pdf.php on line 105
Warning: Division by zero in /portal/solutions/www/forum/fud/pdf.php on line 106
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: wordwrap(): Can't force cut when width is zero. in /portal/solutions/www/forum/fud/pdf.php on line 110
Warning: Cannot modify header information - headers already sent by (output started at /portal/solutions/www/forum/fud/pdf.php:95) in /portal/solutions/www/forum/fud/pdf.php on line 1549
Warning: Cannot modify header information - headers already sent by (output started at /portal/solutions/www/forum/fud/pdf.php:95) in /portal/solutions/www/forum/fud/pdf.php on line 1550
Warning: Cannot modify header information - headers already sent by (output started at /portal/solutions/www/forum/fud/pdf.php:95) in /portal/solutions/www/forum/fud/pdf.php on line 1551
So I had to make a few changes.
on about line 95 of pdf.php:
pdf_add_bookmark($this->pdf, $ttl);
should be changed to:
pdf_add_bookmark($this->pdf, $ttl, 0, 0);
on about line 105 of pdf.php
$max_cpl = pdf_stringwidth($this->pdf, 'w');
should be changed to:
$max_cpl = pdf_stringwidth($this->pdf, 'w'. $this->fonts['Courier'], 12);
and on about like 157 of pdf.php:
$ow = pdf_get_value($this->pdf, 'textx', 0) - pdf_stringwidth($this->pdf, $caption);
should be changed to:
$ow = pdf_get_value($this->pdf, 'textx', 0) - pdf_stringwidth($this->pdf, $caption, $this->fonts['Courier'], 12);
not quite sure what the deal is, because those last two options to pdf_stringwidth() are only required under php-5. Might be beacuse I snagged the latest PDF PHP module (2.0.2 IIRc) before I tested this....
-j
Do pyromaniacs wear blazers?
[Updated on: Sun, 19 September 2004 22:02] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Mon Apr 07 14:33:19 GMT 2025
Total time taken to generate the page: 0.01994 seconds