Skip to main content
kieranl56640093
Participant
August 8, 2016
Question

Interactive PDF - 'Browse' or 'Add Attachment' Button

  • August 8, 2016
  • 1 reply
  • 1138 views

HI, I'm trying to work out how to add a button to an interactive PDF so students can attach photos. I've found a few examples which attach files to the PDF under "Attachments," but my problem is that students will be attaching multiple photos and when marking the document, I need a way for them to be identified. When they are showing under "Attachments," the name is just the file name. Can I either customise the name automatically when they are attached, or have the files linked to be opened n the same page they wee attached?

The javascript I have found which browses and attaches, but does not uniquely name or store files:

if (app.viewerVersion < 11) {

  import_pre_11();

} else {

  import_11();

}

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 8, 2016

What you found is very partial. You're missing the most important part of the code (the import_pre_11 and import_11 functions themselves)...

Are your users going to be using Adobe Acrobat (ie, not the free Reader) to fill in these files? If not, what you're asking for is not possible, unless a very special right is first applied to your file.

kieranl56640093
Participant
August 8, 2016

Yeah, I haven't done any extensive testing. Just providing a piece of script I'e found which was working for me upon very brief testing.

The users will be using Acrobat Reader

try67
Community Expert
Community Expert
August 8, 2016

In that case it's a no-starter. The only way they can attach files (again, unless you apply this very special right to the file) is by using the Attach File commenting tool, and then you have no way of changing the file name of the attached files.