Import Multiple Icons
The project I'm working on is a photo report. The technician filling it out looks at a photo log and adds 6 or more photos and captions to the PDF before printing it. I have each photo button set up like so:
event.target.buttonImportIcon();I know that this method has security restrictions (a red 'S' in its quick bar in the Acrobat API Reference), although I don't completely understand that. When am I not able/unable to call such methods? I ran into this first when trying to spawn a blank page from a button (I ended up discovering and using templates this way).
However, I digress. My real question is can I set up a document that can import multiple icons in one shot? The file will be stored on a remote server (as well as the photo files its importing), and there is noticable lag while importing. I would like to be able to handle it one of the following ways:
- Place the photo report template in the same folder as all the photos to be imported; all photos in the folder with it are automatically imported
- The user opens an import dialog which allows multiple files to be selected
- The user creates a list with file names (or partial file names) and provides a path to the photos
I am okay with this requiring Folder level script, if that's the only option. I just want to reduce the number of times the user waits for files to be imported to one.
