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

How do you resize an image in a interactive pdf

Community Beginner ,
May 21, 2024 May 21, 2024

Copy link to clipboard

Copied

Hi all, 
I have been using InDesign to create my company's ID badges. In that program, I can size the image to fill the entire rectangle without stretching or warping the image.
I have made this file into a PDF as the rest of the team have Acrobat and then can make their own cards for each department.

I have placed an image box through prepare form, but when I put a photo in it it will either stretch the image and make the faces long and thin or have empty space on the top and bottom of the image.

Is there a way to make it scale proportionately to fit the whole rectangle without distorting the image 

TOPICS
Create PDFs , Edit and convert PDFs , How to , Modern Acrobat , PDF , PDF forms

Views

287

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 ,
May 21, 2024 May 21, 2024

Copy link to clipboard

Copied

What options do you use at the image field?

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 ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

In the prepare form tool, I just used the Image field component. Then put a normal image file into that 
At the moment I have the setting set to, Always scale - proportionately - fit to bounds
they are the only settings I've played with as the rest didn't seem to do anything 

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 ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

If the aspect ratio of the image and the image field do not match, then there is no other option than to either scale the image asymmetrically, crop it, or leave empty space. It sounds like what you really want is to change the field aspect ratio to match the image aspect ratio, i.e., resize the field. 

 

This can be done with a script. The first step is to aquire the image dimensions, from which the new width or height of the field can be calcuated to match aspect ratio. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

I'm not really sure what you mean sorry. I have attached an image of the file I'm working on. As it's a company ID and going out to multiple departments, I need a fix that the nongraphic designers/non-techy people can do. The files are just jpegs/ Pngs sent in by the staff. 
I have been creating these ID cards for the last few years so they will still need to look as close to my orginal file as possible. Ive also never done anything with script so would be very unsure where to start with that

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 ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

In your example the image of the fox has white space above and below it in the image field.  This is because the ratio of the height to width of the image and the field are different. You can see that the way to make the image fit the field perfectly is to make the field shorter. You can do it manually in Perpare Form mode. Give it a try.  It can also be done with a script.  

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

I really can't make the field smaller as they need to be uniform across the company and each photo from staff will be a different size. 
Would the issue be that the field is a rectangle?

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 ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

The point of the script would be to resize the field to correctly fit the photo dimensions. 

 

The idea being that if photos are of different sizes, then the image field has to change size to fit the photo. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

So there isnt any script to make the photo fit to the photo field?

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 ,
May 24, 2024 May 24, 2024

Copy link to clipboard

Copied

LATEST

Yes, there is a way to make the photo fit the field. Open it in an image editing app and crop it to fit the image field dimensions.   Otherwise, as I've been trying to explain, the only option is to change the field size. 

 

Do you understand the issue with the different aspect ratios between the image and the image field?

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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