pdf_close error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
JasonTC
Forum Commoner
Posts: 92
Joined: Wed Nov 02, 2005 11:05 am
Location: Grand Rapids, MI

pdf_close error

Post 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
JasonTC
Forum Commoner
Posts: 92
Joined: Wed Nov 02, 2005 11:05 am
Location: Grand Rapids, MI

P.S.

Post by JasonTC »

Oh yeah, and I have no idea what this error even means in the first place.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the error means exactly as it says, there were no pages stored into the pdf..
JasonTC
Forum Commoner
Posts: 92
Joined: Wed Nov 02, 2005 11:05 am
Location: Grand Rapids, MI

Post by JasonTC »

So this script just generated a blank PDF file?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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"
JasonTC
Forum Commoner
Posts: 92
Joined: Wed Nov 02, 2005 11:05 am
Location: Grand Rapids, MI

Post by JasonTC »

Ok, thanks.
Post Reply