Skip to main content
Participant
May 22, 2024
Question

How do you resize an image in a interactive pdf

  • May 22, 2024
  • 2 replies
  • 4034 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
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
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

Participant
September 19, 2024

In fact there is not problem.  But here's something you can do. 

1)  Make the image field as large as it can be on the page without interfering with other content. 

2) Open the properties dialog for the image (button) field.

3) On the "Options" tab, press the "Advanced" button.

4) check the "Fit to Bounds" checkbox.

5) adjust the margin offsets to place the image in the button at the edge you'd like it to sit on. 

 

Done. 

 


Great. Thanks Thom. That surely helped. Just wondering like some of the comments posted in the past to see if there is any way I can make the picture fit proportionately to the image field. The option you provided does help, but if there is any better option like a script, I can run to make it fit. Thanks once again Thom for your help and which is much appreciated. 

Bernd Alheit
Community Expert
Community Expert
May 22, 2024

What options do you use at the image field?

AbilityDNAuthor
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