These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Attachment on a form

laurasportfolio
Registered: Jan 3 2008
Posts: 2

I created a form for my clients to fill out and I want to add a button where they can click, browse their computer and upload an attachment (.gif, .jpg, .eps). How do I add this option to my form?

My Product Information:
Acrobat Pro 8, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This is a tricky one, but it can be done.

Attaching a file to a PDF requires that the document has "File Embedding" Rights, or the user has Acrobat Professional.

If either of these is true then you can use the Acrobat JavaScript funtion "doc.importDataObject()". This function will display a file open dialog and then embed the selected file.

An alternative is to use the AcroForms "Submit File" feature. Using a submit requires that you also write a server script to handle the incoming data, and this is an AcroForms only feature, so it may not work for you. Here's an article that explains it all.

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/popup_windows_part4/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/popup_windows_part4/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script