I need to create a button or link that allows a Reader user to click and attach a resume file. Most attachments will probably be Word documents.
Using Acrobat Pro XI, is it possible to add that type of button to a form?
I'll be using Acrobat XI Pro to create the form. I could possibly use Acrobat DC, but I don't know anything about that version.
I'll post something a bit later.
I have this piece of script (below). Would that work?
But I thought that Reader users, even with Acrobat XI, could only use it to insert a PDF. Has that changed?
No, that's just used to set a button icon, not attach a file that can later be extracted. I haven't checked Reader DC yet to see if it allows non-PDFs like images.
I found a related web page that you contributed to
Ideally, I'd like users to be able to simply click a button to attach their file.
Have any improvements been made since that page was posted that would allow Reader XI users to attach a file?
Yes, there is a method that's available with Reader XI and DC that allows you to add a script to a button that will prompt the user to select a file to attach. Like the manual method, the file gets attached as a comment, but you can manipulate the placement of the icon so it doesn't appear on the page. It will appear in the attachments pane like a regular file attachment. I promise to post the code later today.
George, I truly appreciate your help on this and will look for your post later today.
Here's a link to a sample document: Dropbox - importTest_20150411_1.pdf
It is currently set up to add the attachment icons (when used with Acrobat/Reader 11 or greater) below and to the left of the bottom left corner of the page, so they usually won't be visible as they would be when a user manually adds a file attachment as a comment (annotation). Any comment attachments that are added will appear in the Attachments pane.
Many thanks for sharing your file! This is great for Acobat XI or DC.
For the Reader X and earlier users, if the PDF is Reader Enabled in Acrobat (not LiveCycle Reader Extensions), would they be able to use the commenting tools to add file attachments?
Yes, they will be able to manually attach files like that article you linked to before discusses. For Reader versions prior to 11 to be able to manually attach file, the document will need to be Reader-enabled with Acrobat so that commenting is allowed.
I received the email below and am replying on this forum:
Did you manage to make attachment to work in your PDF form?
I tried to use the example but when I press the send button, Outlook only attached the form and not the attachments.
Button to allow user to attach a file
Can you please send me a working PDF form with button for attachments to: firstname.lastname@example.org
The sample file that George Johnson provided works perfectly. The link in in the "Correct Answer" #10 message, and it sounds like you already found that file. The attachment kind of becomes part of the PDF; it is embedded in the PDF. When you send with Outlook, only the PDF will show as an attachment in the email. When the PDF is opened, as George explained, whoever receives the PDF can open the attachment by double-clicking it in the Attachments pane if they are using Acrobat XI or higher.
I hope this helps. If not, post again.
Hi George, I use Adobe Acrobat Pro, and the button doesn't work. Can you help me, please?
Hi George, appears this message:
ReferenceError: import_11 is not defined
I don´t know I do wrong, thanks
HI George, I tried to copy and also i do it my seflf. I include the javaScrip. Ando also doesn't. If i'm do by the 2 forms in your pdf exemple works, but if i do in mine, doesn´t work, I use Adobe Acrobat XI version 11.0.0.
Can you help me with another thing, please? It´s possible with a text field, when he reach the maximum size, add automatically a new page?
Thank you so much!!
The code would have to be modified to work with an XFA form, and it can only work with static XFAs, not dynamic ones. You might want to ask in the LiveCycle Designer forum here for more guidance.
Hello, I came across this thread after putting an "attachment" button into a PDF Form where we want people to attach drawings and documents to send back to us. I realize that any older versions of Reader doesn't allow this, and can use the comment workaround.
My original button was set up and worked in Acrobat Pro DC, but as soon as it was sent to anyone, it no longer did anything when you clicked it. Reader (11) seems to be the culprit, it just doesn't want to open the Add Attachment dialog at all.
I then tried adding the button you created above to see if it would be different than mine (the JS was different) and again worked in Pro DC, but not in Reader (11).
Is there a setting I need to enable or something else I need to add? I thought this would be a very simple addition to a PDF form, but am going crazy trying to make this work.
My Original button JS:
Which opened the add attachment dialog in Pro DC, but nothing else.
Any help would be greatly appreciated.
The importDataObject document method won't work with Reader, so you have to use the techniques demonstrated in the sample document that I posted a link to earlier.
Actually I just tried that piece of code lower in this thread from Kellya and that seemed to have worked! I have no idea what the difference is from the code below, or the code in the original button example in this thread, but I am happy it works.
That original button PDF posted was not working for me - same outcome as my own button that I added.