Copy link to clipboard
Copied
Students need to be able to import a picture for their P.E. lessons. For the organization of the lesson. These pictures can be pdf/jpg/png. Is it possible to make a field that would allow this?
If it has to work with Reader, then the students will need to use Reader 11 (XI) or DC (Windows/Mac only) and the pictures will need to be in PDF. To set up the field to import the PDF, create a button and on the Options tab of the field properties dialog, set the Layout to "Icon only", and on the Actions tab add a Mouse Up JavaScript that is:
// Mouse Up JavaScript for a button
event.target.buttonImportIcon();
When the button is clicked, the user will be prompted to select a page from a PDF to use
...Copy link to clipboard
Copied
If it has to work with Reader, then the students will need to use Reader 11 (XI) or DC (Windows/Mac only) and the pictures will need to be in PDF. To set up the field to import the PDF, create a button and on the Options tab of the field properties dialog, set the Layout to "Icon only", and on the Actions tab add a Mouse Up JavaScript that is:
// Mouse Up JavaScript for a button
event.target.buttonImportIcon();
When the button is clicked, the user will be prompted to select a page from a PDF to use as the button icon. Acrobat users will be able to select any format that Acrobat knows how to convert to PDF, which includes the common image formats.
This is the barebones requirements and you can refine things by setting up the scaling options (Options tab > Advanced button), add additional JavaScript code to handle errors and for resetting to blank, or adding a separate button to trigger the import into the picture display button. Post again if you'd like more information.
Copy link to clipboard
Copied
Hey George, I've seen you answer quite a few questions and you seem to be pretty knowledgeable and helpful. I created an interactive PDF in InDesign and after many frustrating hours, thanks to you, I finally figured out how to allow a user to add a picture to a PDF using the ImportIcon script. However, the report I am creating needs to allow the user to add multiple pictures to different buttons, or placeholders to create the report for the client. So created all my boxes and buttons and it works great for the first one, but when I add the second or sometimes it the third picture, it will then change all the previous pictures to the one I just added. Is there something I need to add to the script to allow each one to stand alone?
Also is there a way to let the user remove a picture they didn't intend to add?
Copy link to clipboard
Copied
Don't use the same name for the different buttons.
Copy link to clipboard
Copied
You need to give each field a unique field name.
Clearing a selected image is possible, but tricky.
Copy link to clipboard
Copied
Super! really a great help. But yes... resetting to blank would be no luxury (mistakes will be made)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now