Page 1 of 1

pdf_close error

Posted: Wed Nov 02, 2005 11:21 am
by JasonTC
I'm having the great privelege of looking at someone else's poorly commented code and trying to figure out why it doesn't work. He's written a script that generates a PDF file from some database info. I'm getting the following error:

Fatal error: PDFlib error: [2106] PDF_close: Generated document doesn't contain any pages in c:\wwwroot\taxsale\pdf.inc on line 33

This error only occurs in certain instances - with certain database info, it works fine. I'm not too familiar with writing PDF files with PHP, though, so I don't know what to try. Any ideas?

Thanks,
Jason

P.S.

Posted: Wed Nov 02, 2005 11:23 am
by JasonTC
Oh yeah, and I have no idea what this error even means in the first place.

Posted: Wed Nov 02, 2005 11:30 am
by feyd
the error means exactly as it says, there were no pages stored into the pdf..

Posted: Wed Nov 02, 2005 11:42 am
by JasonTC
So this script just generated a blank PDF file?

Posted: Wed Nov 02, 2005 11:49 am
by feyd
that's what it sounds like it did. I would suspect it had an error while processing the first page so it didn't get injected and thereby skipped out, causing the close call to generate the "error"

Posted: Wed Nov 02, 2005 11:54 am
by JasonTC
Ok, thanks.