Skip to main content
chintalp25559039
Participant
May 15, 2019
Question

PDF attachment import and export

  • May 15, 2019
  • 2 replies
  • 1185 views

I am using the file at https://www.pdfscripting.com/public/FreeStuff/PDFSamples/ImExportAttachSample.pdf for uploading and downloading attachments. But when downloading the attachments the extension is getting lost. So, how to retain the extension? I am uploading files with extensions like docx, png, jpeg, xls, etc

I am open to other suggestions to for uploading and downloading attachment to pdf file.

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
May 16, 2019

With all due respect to Thom, one of our great masters, it must be acknowledged that this document is a little outdated now that Reader (since version XI) allows to use Commenting tools without limitation.

You will find a great tuto here with a sample PDF (chapter 5):

- in French : https://www.abracadabrapdf.net/?p=4295

- in Google-English : https://translate.google.fr/translate?sl=fr&tl=en&u=https%3A%2F%2Fwww.abracadabrapdf.net%2Fressources-et-tutos%2Fjs-et-f…

(You can set the Pin icon coordinates outside of the page if you don't want users to see it)

Acrobate du PDF, InDesigner et Photoshopographe
Bernd Alheit
Community Expert
Community Expert
May 16, 2019

What can you see in the attachment panel?

chintalp25559039
Participant
May 16, 2019

as you can see from the 2nd screenshot when clicking on "export an attachment" the windows dialog box doesnt have any extension shown after file name or even the "save as type" doesn't have any type selected.

any solution for the above?

Thom Parker
Community Expert
Community Expert
May 16, 2019

Thanks JR, that sample is probably 15 years old, but still working

Bernd is correct. Windows is trying to out think the user, because MS figures users have no idea what they are doing. Unfortunately this gets in the way of simple items like file extensions, and getting into the folders where Acrobat stores most everything useful.

I have a full discussion on this topic in this article on installing Acrobat automation scripts.

Instructions for Installing Folder Level Scripts (Automation Tools) and Plug-ins

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often