FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » PDF Generation & PHP 4.3.8 / PECL Package pdflib 2.0.2
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
PDF Generation & PHP 4.3.8 / PECL Package pdflib 2.0.2 [message #19959] Sun, 19 September 2004 21:58 Go to previous message
jmccombs is currently offline  jmccombs   United States
Messages: 8
Registered: September 2004
Location: Northern Virginia
Karma:
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. Smile

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

[Message index]
 
Read Message
Read Message
Previous Topic: Can't change settings in user CP(2.6.5RC3)
Next Topic: right management bewilderment
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 19:26:14 GMT 2024

Total time taken to generate the page: 0.04523 seconds