Skip to main content
BrianWolt
Participant
May 3, 2016 2:56 PM UTC
Answered

How Can I Batch Print Only 1st Page of Multiple PDF's?

I am looking for a way to batch print only the first page of multiple PDF's on a Windows System. I made an extensive online search but I either need to use ACTIONS Adobe Acrobat PRO (we have standard) or they didn't help.

Any suggestions? Thanks...

This topic is closed to new replies. Start a new post to keep the conversation going.
ReinhardF
ReinhardFCorrect answer
Participating Frequently
May 3, 2016 9:52 PM UTC

You can do it with a simple VBScript (I wrote some years ago).

Save the attached script as AcroPrintFirst.vbs on the desktop.

Then you can drag & drop pdf files on it,

The first page will be printed to the standard printer.

Enjoy, Reinhard

AcroPrintFirst.vbs

'//Print first page of pdfs

set WshShell = CreateObject ("Wscript.Shell")
set fs = CreateObject("Scripting.FileSystemObject")
Set objArgs = WScript.Arguments

if objArgs.Count < 1 then
   msgbox("Please drag a file on the script")
   WScript.quit
end if

Set gApp = CreateObject("AcroExch.App")
gApp.show '<- comment or take out to work in hidden mod

'open via Avdoc and print
for i=0 to objArgs.Count - 1
   FileIn = ObjArgs(i)
   Set AVDoc = CreateObject("AcroExch.AVDoc")
   If AVDoc.Open(FileIn, "") Then
      Set PDDoc = AVDoc.GetPDDoc()
      Set JSO = PDDoc.GetJSObject
      jso.print false, 0, 0, true
      gApp.CloseAllDocs
   end if
next

gApp.hide : gApp.exit : Quit()
MsgBox "Done!"

Sub Quit
  Set JSO = Nothing : Set PDDoc = Nothing : Set gApp =Nothing : Wscript.quit
End Sub

12 replies

Karl Heinz  Kremer
Community Expert
Community Expert
May 3, 2016 5:08 PM UTC

If you know how to program in JavaScript, you can - even with Acrobat Standard - create a document level script the e.g. adds a menu item to Acrobat's menu (or a tool button to it's tools area), and then do your batch printing from such a script. The problem is that you need to pass in the names of the field you want to process.

Take a look at the Dpc.print() method for information about how to specify just one page. You can also find the necessary one line script in probably any forum post that references the actions wizard (e.g. here: Printing only first page of multiple PDF's )

The only real problem you will run into is that Acrobat Standard has no simple way of brining up the JavaScript console/debugger. See here for information about how to get around this: Access Javascript console in Acrobat X STANDARD (JavaScript)

At the end, you have to ask yourself how much money your time is worth, and it you might not be better off just paying the upgrade fee to Acrobat Pro. As you can see, it's much easier to do this with the Action Wizard.

Translate
BrianWolt
BrianWoltAuthor
Participant
May 3, 2016 7:05 PM UTC

Thanks...sadly, management doesn't want to pay a dime, so they are challenging me to come up with a free solution.

Translate
try67
Community Expert
Community Expert
May 3, 2016 7:09 PM UTC

That's known as "Penny wise, Pound foolish"... How much money are they wasting on you doing the research? And on doing this task manually (which you'll probably end up doing)? Probably more than what it would cost to upgrade to Acrobat to do this task automatically.

Translate
try67
Community Expert
Community Expert
May 3, 2016 4:16 PM UTC

You answered your own question. It requires Acrobat Pro.

Translate
mustansirg1g
Participant
Jan 10, 2017 5:56 PM UTC

How would you accomplish this using Adobe pro please? Thanks in advance!

Translate
try67
Community Expert
Community Expert
Jan 10, 2017 7:46 PM UTC

Create an Action that executes this code:

this.print(false, 0, 0, true);

Translate