How to insert a picture in its original (not enlarged) size to PDF page 1?

This Forum is for the use of End Users requiring help and assistance for Tracker Software's PDF-Tools.

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Stefan - PDF-XChange

TheAutomator
User
Posts: 1
Joined: Mon Jun 09, 2025 12:16 pm

How to insert a picture in its original (not enlarged) size to PDF page 1?

Post by TheAutomator »

I would like to insert a cover picture JPG to an existing PDF at page 1.

Could please someone tell me how I have to define my own "Tool" to achieve these steps:

a) I would like to call "PDF Tools.exe" with my newly defined "Tool" from Windows command-line.
b) I would like to pass the picture name as %1 and the PDF name as %2 from the Windows command-line.
c) The PDF-"Tool" should add/insert the given picture %1 in its original size to the PDF %2 at page 1.
It should NOT resize a smaller picture to the full page size. It should only resize a bigger picture to fit the full page an keep the aspect ratio.

In my attempts, I was not able to find a way for b) and c).

Any ideas?

BTW:
The above should automate the following manual steps in PDF-XChange Editor:
a) Open the local existing PDF file
b) Choose "Organize" and "Insert" and "Insert images"
c) Open the local existing JPG file
d) Press OK
e) Save PDF with newly added picture in its original size at page 1 of the PDF with the same name (overwriting existing PDF)
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11302
Joined: Wed Jan 03, 2018 6:52 pm

Re: How to insert a picture in its original (not enlarged) size to PDF page 1?

Post by Daniel - PDF-XChange »

Hello, TheAutomator

To start this process, you would likely want to create your own custom tool, as detailed here: https://www.pdf-xchange.com/knowledgeba ... -PDF-Tools
Specifically, using the "Create PDF from Images" action in your tool.
- Relating to question#3, your "image to PDF options" for the "create PDF from images" action, needs to be configured with this option "Off" or set to "reduce to cell" (Ensuring that images will only get smaller, never larger):
image.png
And similarly, with question#2 you would need to configure the desired image "label" here:
image(1).png
Note that the Default is a macro for the input filename. If your input file is "flowers.png" the PDF generated should have a label showing "flowers.png".

Once that is done, you can right click on the tool, and choose to copy the Tool ID.
That Tool ID can be used in the following command line options:
https://help.pdf-xchange.com/pdfxt10/co ... ons_t.html
- Second note for question#2, one of the cmd options is "/Output", this is how you define the output filename. I don't believe it is possible to use "macros" via the CMD interface, those options would need to be configured in the tool's own settings instead (and in turn, do not supply output details via cmd).

After you have converted the image to a PDF, you would then want to use the "combine files" action, to quickly merge them all together, under the main PDF file you have in mind. This can be done either via PDF-Tools, or through the Editor, at your discretion.

Kind regards,
You do not have the required permissions to view the files attached to this post.
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
Support@pdf-xchange.com