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?
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.
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