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

Methods add images when the usual two don't work?

Bard
Registered: Jun 30 2010
Posts: 2

I've been trying to no avail to find a method to add images to a form (and then save it to a fdf).
The "button method" using a button and "event.target.buttonImportIcon();" as javascript doesn't seem to work if the form is filled using Acrobat Reader or any other freeware software like FoxIt Reader.
I can't use LiveCycle image field either because it doesn't work on a static form and making it a flowable layout one utterly destroys it (It's a form based on a preexisting pdf).

Are there any other methods I could use except those two that I didn't manage to find and that would allow anyone to fill the form and save it as fdf?

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately the usability of the Button image functions has changed in just about every version of Acrobat/Reader. Unless you have the Reader Rights Enabling server, they really aren't reliable for use on Reader. And even then you'll have big version compatibility problems.

But there is a way to submit an image file to FDF from Reader, And that's to use the "field.browseToSubmit()" function. Now of course you can't save FDF to disk from Reader unless there is special "Export" rights on the PDF, but you can submit FDF.

And there is another option that may be a little complex to implement. You can upload images to an HTML page, and a PDF loaded into a web page (in a special way) can communicate with JavaScript on the page. So you could in effect transfer the image data from HTML to PDF. Displaying the image in the PDF can be done but it's really complex.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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