Fix Stretched Images in PDFs

Add Image to PDF draws the embedded image using the exact width and height submitted in the placement, with no code that compares those values to the image's original proportions.

MDN's own documentation for the object-fit CSS property describes its default fill behavior as stretching content to completely fill a box without preserving the original aspect ratio, the same width-and-height-only behavior that stretches an image placed on a PDF page. object-fit CSS property

Add Image to PDF

Image Looks Stretched After Adding To PDF

Review the width and height values entered in the placement form.

Check the original image file for its native pixel dimensions.

The placement validation only confirms the rectangle fits within the page and uses positive numbers, so a width and height that distort the image still pass this check.

Calculating Proportional Dimensions

Divide the original width by the original height to find the aspect ratio.

Multiply the desired width by that ratio to calculate the correct height.

Enter the calculated height into the placement form.

Continue with PNG vs JPEG for PDFs or Exact Coordinates Guide.

Frequently Asked Questions about Fix Stretched Images in PDFs

How do I fix a squashed image?

Multiply the target width by the original ratio to get the matching height.

Where do I find the original image size?

Open the image file in a viewer to see its pixel dimensions.

How do I prevent stretching?

Match the width and height values to the image's native proportions.

What if the image still looks wrong?

Upload the file again with the corrected dimensions.