Import Images into Field with JavaScript

Acrobat 5.0 enables you to copy and paste
data between PDF files. However, there may be
times when you wish to enable interactive elements
such as importing images in a PDF file. A
good example might be an insurance claims
form where photographic images can assist
claims adjustment appraisals.

You can set up a button to import an image in
a form field with a simple JavaScript routine. To
do so, create a form field and select Button for
the field type. In the Add an Action dialog box
select JavaScript from the Type pull down
menu.

In the JavaScript Edit dialog box enter the following
line of code:

event.target.buttonImportIcon(); 

When the user clicks on the button a dialog box
will appear enabling navigation to find an image
to import.You can secure the form and prevent
users from changing fields, yet still enable them
to import images.

Bonus…

Images can be imported from the files saved in all formats compatible with the Open As Adobe PDF menu command.

Then using a Digital Camera, you can import directly from the camera or a flash card with a compatible TWIAN driver.

You May Also Like

About the Author: Ted Padova

Leave a Reply