Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

How do you create a pdf from images (.pngs) but target an A4 landscape page size

Community Beginner ,
Feb 07, 2022 Feb 07, 2022

I have a set of images (pngs) that are relatively high res (3k * 1.8 k) and want to create a PDF with each image as an A4 landscape page.  If I simply import these images into acrobat (using create from file), I get a page size something like 39x27 inches.

Is there some way to set the page size before importing?

(Also, is there a way to make the sizes metric?)

Thanks

Simon

TOPICS
Create PDFs , General troubleshooting , How to
2.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 07, 2022 Feb 07, 2022

Hi Simon,

 

Hope you are doing well and sorry to hear that. As described you want to create a custom page size of the images in the PDF.

 

Please go through the steps shared under the heading 'Create and use custom page size' in the help page https://helpx.adobe.com/acrobat/using/using-pdf-printer.html and see if that works for you. 

 

Regards

Amal

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 08, 2022 Feb 08, 2022

So in essense, I need to create the pdf from the images as before (with the wierd page size) and then "print to pdf" to get an A4 pdf?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2022 Feb 07, 2022

You can create a new file with a blank A4 page using this code:

app.newDoc(8.3*72, 11.7*72);

Then you can use the Background tool to insert your image to the page and scale it down so that it fits it.

The entire process can also be scripted, if you want to add multiple pages.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 08, 2022 Feb 08, 2022

Addendum: Another option is to use the Scale Pages preflight tool, if you have Acrobat Pro DC.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 08, 2022 Feb 08, 2022

Where do I use the "app.newDoc(8.3*72, 11.7*72);" code?   At the moment I'm just using Adobe Acrobat's   menus with
   File âž¡Createâž¡Pdf from File...

 

If there's a script approach that would be preferable as I'm writing code to generate the images and I'm still tweaking that program so anything to automate the process would be a blessing.

 

(This is all because the pdf export option from the documentatin tool I'm using (confluence) is woeful, but I can use the browser to save a massive image which I'm automatically dicing into pages after detecting white space breaks in text/images)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 08, 2022 Feb 08, 2022

You don't find it, you use it... Either from the Console, or as a part of a larger script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 08, 2022 Feb 08, 2022
LATEST

Answering my own question, I've found the easiest solution for me is to use ImageMagick's "convert" command i.e.

convert -page 842x595 Image1.png Image2.png Image3.png  ...etc..  Document.pdf


This was a tip on stack overflow. The 842x595 is effectlive A4 in landscape

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines