How can I print selected pages from multiple PDFs?
December 3, 2016 2:46 PM   Subscribe

Is there a way print only the third page across multiple documents without individually opening each one? I figured this must be a solved problem.

I have a workflow process (it involves couriers, don't ask) that involves printing the third page of multiple PDFs.

Right now, my work flow is to open all of the documents, and click print > Page 3 only > Close > Onto the next doc > Repeat until done.

Is it possible to print only the third page (or first page, or whatever) of multiple documents without having to individually open and print from each one?

I work in both a Windows 7 and a Mac environment if that helps.

This is driving me around the bend.
posted by generichuman to Technology (7 answers total) 3 users marked this as a favorite
I think what you are going to want to do is extract the third page, save it is a PDF, print that PDF, then delete the PDF, rather than trying to print only one page of a longer PDF. Acrobat will let you print a PDF directly from the command line, but I don't think there is an option just to print one page.

Are you comfortable with any scripting languages? This seems like an ideal task to accomplish with a little bit of Python and the appropriate libraries. I believe you could also achieve this with Acrobat's built in scripting language, which is Javascript.
posted by ssg at 3:07 PM on December 3, 2016

I just tested this on my Windows machine with some random PDFs. This should work on the Mac too with slight differences in commands. 

Instructions for Windows:
Install 'ImageMagick-7.0.3-8-Q8-x64-dll.exe'.
Install 'gs910w64.exe'.

Open up the command line (windows key + r) type 'cmd'.

When you're in command line you'll need to navigate to the folder that contains your PDFs. You'll type a command like 'cd C:\Users\username\Downloads\pdf' to get to the folder.

Use this command to create a new PDF that contains the third page from all PDFs in the current folder:
convert -density 150 *.pdf[3] only-page-3.pdf

That command breaks down like this:
  • "convert" -- is the ImageMagick conversion tool.
  • "-density 150" -- is the output resolution of your new PDF; you can probalby just keep it at 150.
  • "*.pdf[3]" -- this selects all the files that are PDFs in the folder and the "[3]" specifies that you only want page 3. You might need to play with that number page 3 might actually be labeled page 4 or page 2 for reasons.
  • "only-page-3.pdf" -- The output filename for your new pdf of only page 3.

posted by gregr at 4:32 PM on December 3, 2016

Take a look at PDFtk. I'm not sure of the exact Windows/Mac compatibility but it seems there is some. I use the Linux version every year to extract the couple of pages out of tax form PDF's for printing but have to look up the command line every time.

Goes something like:
pdftk A=file1 B=file2 cat A3 B3 out printme.pdf
It has the power to slice and dice PDF in a myriad of ways.
posted by zengargoyle at 4:35 PM on December 3, 2016 [4 favorites]

I use pdfmerge for manipulating pdf files. The syntax looks similar to imageMagick: "pdfmerge file*.pdf[3]".
posted by froghopper at 4:40 PM on December 3, 2016

I can confirm pdftk works on the Mac. It's what I was coming to say.
posted by hoyland at 6:11 PM on December 3, 2016

I've also had good luck w/ PDFtk for tasks like you're describing.
posted by eelgrassman at 10:27 PM on December 3, 2016

PDFtk can easily extract the third page from multiple documents and merge them into a single document that you can print. I use it frequently on a mac.
posted by Salvor Hardin at 12:27 PM on December 4, 2016

« Older Shimmer nail polish that's ONLY shimmer?   |   Real Live Permanent Weight Loss? Newer »
This thread is closed to new comments.