Skip to main content
New Participant
May 22, 2024
Question

How do you resize an image in a interactive pdf

  • May 22, 2024
  • 2 replies
  • 3984 views

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 

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
May 22, 2024

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 PDFScriptingUse the Acrobat JavaScript Reference early and often
AbilityDNAuthor
New Participant
May 22, 2024

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

Thom Parker
Community Expert
May 24, 2024

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


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 PDFScriptingUse the Acrobat JavaScript Reference early and often
Bernd Alheit
Community Expert
May 22, 2024

What options do you use at the image field?

AbilityDNAuthor
New Participant
May 22, 2024

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