Corrupt PDF file

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Corrupt PDF file

Postby starzen » Fri Feb 19, 2016 4:36 pm

Odd issue happening

we had reports of a customer having an issue were a PDF file that was attached to an email was received corrupted on the other end.

Did some testing

Ran VPEViewer on Windows Server 2012, double clicked on an existing VPE file and then emailed it using Windows Live Mail. On the other end the file was corrupted. I then tried to open the PDF from inside the email dialog and save it on the server. that PDF file was not corrupted. Then we tested emailing this file and it was fine on the receiving end.

Any idea what this could be?

Mike
starzen
 
Posts: 30
Joined: Tue Feb 01, 2005 12:23 am
Location: Miami, FL

Re: Corrupt PDF file

Postby IDEAL Software Support » Mon Feb 22, 2016 11:21 am

We have no idea why Windows Live Mail corrupts the file. In fact, the attachment is a file, which is generated by VPE on-the-fly as temporary file in the tmp directory.

double clicked on an existing VPE file and then emailed it using Windows Live Mail


Just to get the whole picture: did you mail it as VPE or as PDF file?

And what does "corrupt" mean? Can you run a diff on the original and the received file?

What you can try is the following: Turn the automatic attachment off, generate yourself the file using WriteDoc() and attach it to the mail. Maybe Windows Live Mail doesn't like the tmp directory (just a wild guess). Please let us know if this helps.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Corrupt PDF file

Postby starzen » Tue Feb 23, 2016 1:49 pm

it was sent as a PDF. Actually to minimize data points i used the VPEViewer to test this

whats strange is this

if i click the email icon on vpeviewer the email dialog comes up. if i send the email the file will be corrupted. if i save the PDF file and then email via livemail it is not corrupted.

it doesnt happen with all PDF files either. only some

i did some research and found an issue people are having with livemail when the option is enabled to cut larger emails into smaller chunks but that was not the case
starzen
 
Posts: 30
Joined: Tue Feb 01, 2005 12:23 am
Location: Miami, FL

Re: Corrupt PDF file

Postby IDEAL Software Support » Tue Feb 23, 2016 2:10 pm

Did you try my suggestion? All steps can be performed by code, also attaching the self-generated PDF to an e-mail.

See the methods ClearMailAttachments() and AddMailAttachment().

The description of AddMailAttachment() in the Reference Manual also provides some background information.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Corrupt PDF file

Postby starzen » Fri Feb 26, 2016 12:31 pm

I have to double check with the client but i am pretty sure thats what their app actually does. I simply removed their app out of the equation and used VPEViewer to test as that would remove any of their code as an issue
starzen
 
Posts: 30
Joined: Tue Feb 01, 2005 12:23 am
Location: Miami, FL


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 10 guests