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

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

Community Beginner ,
May 03, 2016 May 03, 2016

Copy link to clipboard

Copied

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...

TOPICS
Acrobat SDK and JavaScript , Windows

Views

9.7K

Translate

Translate

Report

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

correct answers 1 Correct answer

Engaged , May 03, 2016 May 03, 2016

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

Se

...

Votes

Translate

Translate
Community Expert ,
May 03, 2016 May 03, 2016

Copy link to clipboard

Copied

You answered your own question. It requires Acrobat Pro.

Votes

Translate

Translate

Report

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 ,
Jan 10, 2017 Jan 10, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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 ,
Jan 10, 2017 Jan 10, 2017

Copy link to clipboard

Copied

Create an Action that executes this code:

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

Votes

Translate

Translate

Report

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
New Here ,
Aug 05, 2021 Aug 05, 2021

Copy link to clipboard

Copied

I've tried this, but it's only printing the first page of the pdf I'm currently on.  Is there a way to have it print the first page of all my open pdfs?  Or am I just doing something wrong

Votes

Translate

Translate

Report

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 ,
Aug 05, 2021 Aug 05, 2021

Copy link to clipboard

Copied

Did you set the Action to process all open files?

Votes

Translate

Translate

Report

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 ,
May 03, 2016 May 03, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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 ,
May 03, 2016 May 03, 2016

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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 ,
May 03, 2016 May 03, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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
Engaged ,
May 03, 2016 May 03, 2016

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
New Here ,
Feb 17, 2020 Feb 17, 2020

Copy link to clipboard

Copied

Rheinhard your VBSscript works great, but does require me to confirm the printing for each pdf.  Is it supposed to run all the PDFs as a batch, or is that possible?  Thanks!

Votes

Translate

Translate

Report

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 ,
Sep 20, 2023 Sep 20, 2023

Copy link to clipboard

Copied

LATEST

So I used this script for years, thank you. But all of a sudden, it stopped working with the latest Adobe Acrobat update (I think that is the cause)...it fails at line 25 which is 

Set AVDoc = CreateObject("AcroExch.AVDoc")

scriptPrinting.jpg

This is actually urgent as our VP uses this many times a week.

Has anyone else encountered this?

Votes

Translate

Translate

Report

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
LEGEND ,
May 03, 2016 May 03, 2016

Copy link to clipboard

Copied

It is possible to write a script to do this using a text editor and the JavaScript console but one will need to specify the file path and file names to process.

As noted it can be done with VBA or other computer languages and on a Macintosh one can even use Apple Script to perform the task.

Votes

Translate

Translate

Report

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