0

My app (running on an iPad) is generating a PDF which is then attached to an email and sent to a client. However when I receive the PDF, Adobe will not open it. This is the error I get:

Acrobat could not open 'Invoice 6020130304036.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

I have created the same PDF on my development environment (Mac) and the file opens ok.

Here's the code I'm using:

put specialFolderPath("documents") & "/Invoice " & tInvoice & ".pdf" into tPDFPath
open printing to pdf tPDFPath     
print card "Invoice" of this stack from 340,0 to 1010,650 into 20,10,575,550
close printing
put tPDFPath into tAttachments["data"]
put "PDF" into tAttachments["type"]
put "Invoice" into tAttachments["name"]
mobileComposeMail tSubject, tTo, tCCs, tBCCs, tBody, tAttachments

Has anyone else experienced similar issues?

TIA, AA.

  • If you provided a sample broken pdf, wer could check in what way it is broken. that might give a hint where to look for the culprit. – mkl Oct 10 '13 at 10:27
  • 2
    Nothing wrong with the PDF after all @mkl. The statement should read: put tPDFPath into tAttachments["file"] not ["data"]. Thank you for replying though. – Alex Alexander Oct 10 '13 at 11:36

0 Answers0