Opening Existing PDF sometimes gives errors

Good Morning,

I've found that this topic has been discussed numerous times online before, but I haven't come across anywhere that a solution has been given (assuming there even is one). Hopefully someone can point me in the right direction.

I frequently use pdf includes to generate reports for my company's clients. Lately, several of them have sent me pdf files that use their special forms as a background, requesting that I print my reports to them.

I am using RUN pdf_open_pdf() to access the existing file, but I'm finding that some documents open just fine, but others give me the following error message:

**Invalid character in numeric input [insert the offending character here]. (76)

I have compared a file that works with a file that doesn't work, and I am unable to determine any differences.

Keep in mind that the files I'm attempting to open are created by an external entity.

I have attached the following files:

pdfExample.p - The code I'm using to open the existing documents
BillTemplate1.pdf - This document opens with the above code just fine.
BillTemplate2.pdf - This document gives me errors when I try to use the exact same code on it.

If anyone could show me the error of my ways, I'd appreciate it. I have a workaround involving converting the document to .jpg and loading it to my report as an image, but if I'd definitely prefer to just be able to use what's provided to me.

Thanks in Advance!


AttachmentSize
pdfExample.p230 bytes
BillTemplate1.pdf113.56 KB
billTemplate2.PDF177.69 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Checking...

Hi Ray

Just to mention that:

1. I'm currently checking what's wrong with pdfinclude v3.3 (I suppose you're using this version? or the SVN one?) - I'll keep you posted here.
Note that the current published version is known to be very nitpicking about the pdf files it accepts to parse, as you have noticed in this forum ;)

2. I've since this my take over on pdfinclude totally rewritten the pdf parser (pdfextract.p) and a great part of pdf_inc.p. This version is not published. I've just checked that it works perfectly with your templates (as it should work with almost any compliant pdf). If you are interested in receiving this version and/or support, can you please contact me privately about this matter?

Regards
JC


pdfExtract.p

Hi Jc,

I'm currently having so much issues with pdfInclude that I thought of re-writing it down as I realised all the mistaken procedures that did not include every kind of third program generated templates.
I started up with that work, thinking it wouldn't be so hard to manage such a job, and it came that every bug that I fixed drove me to another bigger problem....
Then I read your comment on that post...
Could contact me for discussing about my problems ? I'm lost 'cause I need to use open ressources, 9.1e edition (whereas I'm better at .NET and Infragistics technologies...) and the only missing thing in my project is the use of any templates given by customers.
Thanx for answering.

Mike.