Tips & Tricks

Import Images into Field with JavaScript

September 16, 2002

Advertisement
Advertisement
 

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.

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Quick PDF Library

Get products to market faster with this amazing PDF developer SDK. Over 900 functions and an equally...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.