• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Insert multiple images in pdf form

Explorer ,
Jun 13, 2020 Jun 13, 2020

Copy link to clipboard

Copied

Hi, my interative pdf contains multiple image fields where the client has to click on each each field to insert an image.  Is there a way that my client can insert as many as 100 images in one click? Or perhaps if they can insert a photo album directly from the PDF?

would highly appreciate your help with this. 

PS my clients will be using Acrobat reader. 

TOPICS
Acrobat SDK and JavaScript

Views

3.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 14, 2020 Jun 14, 2020

No, that is not possible, unless you know the names of the files in advance and can install a script on the local computer of each client. What is possible, though, is to use a loop to prompt them to select the images one by one and import them directly into the field until they click Cancel. That would save them the step of having to click each image field, but they would still need to manually select all the images.

Votes

Translate

Translate
Community Expert ,
Jun 14, 2020 Jun 14, 2020

Copy link to clipboard

Copied

No, that is not possible, unless you know the names of the files in advance and can install a script on the local computer of each client. What is possible, though, is to use a loop to prompt them to select the images one by one and import them directly into the field until they click Cancel. That would save them the step of having to click each image field, but they would still need to manually select all the images.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 14, 2020 Jun 14, 2020

Copy link to clipboard

Copied

Thanks a lot for your suggestion...can you please guide on hiw this loop may be created? If you can share a script it would be great! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 14, 2020 Jun 14, 2020

Copy link to clipboard

Copied

Let's say the fields are called Image1 to Image100. You can then use this code to import an image into field 1, then 2, etc., until reaching 100 or until the users clicks Cancel in the Select Image dialog:

 

for (var i=1; i<=100; i++) {
	if (this.getField("Image"+i).buttonImportIcon()!=0) break;
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

Thanks a lot Try67...it works like charm....really appreciate.

One more question.

Is there a way to compress these pictures to a predefined DPI so that pdf size does not get so big.  After attaching the pictures in the form, i want my client to attach the same in an email and we are restricted with size of 25 MB.  Thanks for all your help...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

No, you can't compress the files or force them to be a specific size. You can, however, add a script to the file's Did Save even that warns the user if the file is too large...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 20, 2020 Jun 20, 2020

Copy link to clipboard

Copied

Thanks a lot for your response.  Guess will settle with your above solution.  Many thanks for your assistance on this. 🙂🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2022 Jan 24, 2022

Copy link to clipboard

Copied

LATEST

Thanks for sharing this. I have the same concern your answer helps me.

 

Regards

[Spam link removed]

 

Alisha Pal

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 14, 2020 Jun 14, 2020

Copy link to clipboard

Copied

Hi, my interative pdf contains multiple image fields where the client has to click on each each field to insert an image.  Is there a way that my client can insert as many as 100 images in one click? Or perhaps if they can insert a photo album directly from the PDF?

would highly appreciate your help with this. 

PS my clients will be using Acrobat reader. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines