PDF Error Catching

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 Error Catching

Post by JasonTC »

The following code:

Code: Select all

$pdf_filename = "test.pdf";
$pdf = pdf_new();
pdf_open_file($pdf, $pdf_filename);
Isn't creating a file called "test.pdf". This obviously means something went wrong, but is there any way to see some kind of error? I tried looking up error catching in my PHP book but didn't find anything.

Thanks,
Jason
User avatar
Nathaniel
Forum Contributor
Posts: 396
Joined: Wed Aug 31, 2005 5:58 pm
Location: Arkansas, USA

Post by Nathaniel »

put "error_reporting(E_ALL);" (without the quotes) somewhere before the code you posted...
JasonTC
Forum Commoner
Posts: 92
Joined: Wed Nov 02, 2005 11:05 am
Location: Grand Rapids, MI

Post by JasonTC »

Neither created the file nor output any errors. Any ideas as to what could be happening?

Thanks,
Jason
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I would hazard to guess, like your original thread, you have no data stored, so there's no file to create.
Post Reply