Skip to main content
Participant
July 21, 2022
Answered

Adobe Acrobat script for printing all files in a directory - for action wizard

  • July 21, 2022
  • 1 reply
  • 2285 views

I have a folder with a few PDF files, each with multiple pages. I'm trying to get them all to print at once with custom parameters i.e. amount of pages per sheet (6), but can't seem to figure out the correct script. I'm new to acrobat scripting, How can I accomplish this? Thanks

This topic has been closed for replies.
Correct answer try67

Read the documentation of the PrintParams object for more details, but here's the basic code to do it:

 

var pp = this.getPrintParams();
pp.printerName = "Enter the printer name here";
pp.interactive = pp.constants.interactionLevel.silent;
pp.pageHandling = pp.constants.handling.nUp;
pp.nUpPageOrders = pp.constants.nUpPageOrders.Vertical;
pp.nUpNumPagesH = 3;
pp.nUpNumPagesV = 2;
pp.nUpPageBorder=true;
pp.nUpAutoRotate=true;
this.print(pp);

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 22, 2022

Read the documentation of the PrintParams object for more details, but here's the basic code to do it:

 

var pp = this.getPrintParams();
pp.printerName = "Enter the printer name here";
pp.interactive = pp.constants.interactionLevel.silent;
pp.pageHandling = pp.constants.handling.nUp;
pp.nUpPageOrders = pp.constants.nUpPageOrders.Vertical;
pp.nUpNumPagesH = 3;
pp.nUpNumPagesV = 2;
pp.nUpPageBorder=true;
pp.nUpAutoRotate=true;
this.print(pp);
Participant
July 22, 2022

Thank you! the above script will work in the action wizard action "Excute Javascript", and apply to all files in a folder?

Also how can I set a destination folder if I want it to print to a file? cant seem to find that in the guide.

 

try67
Community Expert
Community Expert
July 22, 2022

ah. so it must physically print?

 


No, you can send the file to a virtual printer, but you can't specify the file-name or folder where it will be saved. That's up to the user.