Jump to content
Larry Ullman's Book Forums

Pdf Image Inclusion Errors


Recommended Posts

Hi Larry & all,

 

I was just working through your PDF chapters on the extra material on PHP5 advanced and I am having a problem, I keep getting this error:

 

"A PDFlib exception occurred: Handle parameter or option of type 'image' has bad value 0"

 

This is using both mine and your code from the download section and i've used my own image and also your image with the same result. I was wondering if you know what this exactly means? I've done a fair amount of Googling, but sadly the I can't seem to see what the problem even means. I also kept finding reference to a DOMPDF in Google, but didn't think this applied to my set up.

 

I'm using XAMPP and PDFLib 7.0.5

 

There's no rush in replying and I don't necessarily need a massive answer, I just can't even find what a bad value of 0 means?If you happened to know what this could mean, could you let me know please.

 

Also I did see somewhere try an absolute path, which still returned the same answer.

 

Thanks

 

Jonathon

Link to comment
Share on other sites

  • 2 weeks later...

Since reading either your e-commerce book or blog posts I have now started to consider Zend as an alternative to a lot of other (often outdated) packages. I used it for sending a HTML email with the ecommerce book and it's very clean and one would automatically presume that their security is also very top notch. That's not saying that mine isn't but accidents and bugs do happen, so that's reassuring. I've also started to use it for my Lucene project too and I could very well start using it for the PDFs too. I haven't had chance really to look at either my Lucene or PDF attempts since I posted, something inevitably comes up, but I shall let you know how I get on. Although I haven't looked into it, I wouldn't be surprised if Zend on a whole provides similar examples of some of PEARs better features, maybe such as a GEO-location package. Though I don't think I'd ever warrant using Zend from scratch or actually want to use it unless a was attempting something fairly colossal.

Link to comment
Share on other sites

 Share

×
×
  • Create New...