Automatically resize/compress images imported into Image Form Fields

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

SBN
User
Posts: 2
Joined: Wed Sep 02, 2026 8:40 am

Automatically resize/compress images imported into Image Form Fields

Post by SBN »

Hello,

I am using Image Form Fields in PDF-XChange Editor Plus to insert photos into a PDF form.

My problem is that PDF-XChange appears to embed the original image resolution into the PDF. For example, photos from a smartphone with a resolution of around 4000 × 3000 pixels are inserted into relatively small image fields.

With approximately 13 images, my PDF grew to around 44 MB.

As a test, I externally resized the embedded images to a maximum dimension of approximately 1200 pixels and recompressed them as JPEG. The resulting PDF was only about 2.8 MB, while the visual quality inside the form fields was still completely sufficient.

I would therefore like to achieve this automatically when the user selects an image for an Image Form Field.

Since Image Form Fields are essentially button fields using JavaScript / buttonImportIcon(), my questions are:

Is there any PDF-XChange-specific JavaScript function that can resize/downsample an image before it is stored as the button icon?
Can the JPEG quality or maximum pixel dimensions be specified when using buttonImportIcon()?
Is it possible to intercept the selected image, resize it for example to max. 1200 × 1200 pixels, and then assign the resized version to the field?
Alternatively, is there a PDF-XChange command or JavaScript method that can recompress only the image/icon stream of the button after importing it?

My goal is that users can simply click the Image Form Field and select a normal smartphone photo, while PDF-XChange automatically stores a reduced version so that the PDF file size does not become excessively large.
Thank you
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 13189
Joined: Wed Jan 03, 2018 6:52 pm

Re: Automatically resize/compress images imported into Image Form Fields

Post by Daniel - PDF-XChange »

Hello, SBN

I don't believe there is a way to do so currently, but I have raised the inquiry with the dev team to see if we can add this in the future.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
SBN
User
Posts: 2
Joined: Wed Sep 02, 2026 8:40 am

Re: Automatically resize/compress images imported into Image Form Fields

Post by SBN »

Hi Daniel,

thank you very much for your reply. I would be very happy if this issue could be passed on to the developers, and even more so if they were able to find a solution for it in the future.

Apart from this particular issue, I am very satisfied with PDF-XChange Editor. It is an excellent program, and I would also like to take this opportunity to thank the entire PDF-XChange team for creating such a powerful and well-designed application.

Many thanks again for your support and for forwarding my request to the development team.

Best regards
SBN
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 13189
Joined: Wed Jan 03, 2018 6:52 pm

Re: Automatically resize/compress images imported into Image Form Fields

Post by Daniel - PDF-XChange »

Hello, SBN

Thank you for the kind words, I will make sure the teams see that as well! As for the request, that was already forwarded with my previous post, so now we just need to wait and see what they say about it.

ticket created:
RT#7911: FR: Recompress image form fields

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]