Windows – Batch PDF first page to PNG

adobe-acrobatbatchpdfwindows

The problem sounds fairly simple: I have multiple PDF files and I want to extract the first page of each to a PNG file.

I created an action in Adobe Acrobat DC which is supposed to do the following:

  • Delete all pages from 2 to 999 (because you can't tell it "Just keep page 1" or "Delete every page after number 1")

  • Flatten all layers

  • Export images to PNG

In my mind, this should work, but obviously it doesn't. It's like it only follows the third instruction, filling my export folder with hundreds of single images not of pages but from pages.

I'm quite lost here. If somebody could hint me on why my action is not working or at a way to achieve this, that would be awesome.

Have a nice day!

Edit

A few things to know:

  • I'm at work on company PC and can't install new software.

  • I'm using Windows 10.

  • I'm not a developer and am not comfortable with CLI, PHP, BATs and anything scripting.

  • I can use the internet, so answers can make use of online tools.


What I figured out since last time

So I figured out the "Delete page 2 to 999" instruction wasn't working if the document had not at least 999 pages (and none of them had). I ran the script on a 23-pages document with the instruction "Delete pages 2 to 23" and it worked great, but, well, it would only work for 23 pages PDFs.

As for now I deleted the "Delete pages" instruction and manually delete pages other than 1 in the explorer. Needless to say this is ridiculously long and unoptimized.

Best Answer

An (actually quite obvious) approach would be using Photoshop.

Photoshop can open a given page and render it at configurable resolution with an appropriate color space. It will also properly render the page (something other software may have problems with). Writing out as PNG is also quite straightforward, and well configurable.

Because of the good support of JavaScript (aka Extendscript) and Applescript/VB, the whole workflow can be easily automatized, and be run as batch.

Related Question