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

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

New Here ,
Jul 21, 2022 Jul 21, 2022

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

TOPICS
Create PDFs , JavaScript
2.3K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Jul 22, 2022 Jul 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);

View solution in original post

Translate
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 ,
Jul 22, 2022 Jul 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);
Translate
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 ,
Jul 22, 2022 Jul 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.

 

Translate
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 ,
Jul 22, 2022 Jul 22, 2022

-Yes.

-Not possible.

Translate
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 ,
Jul 22, 2022 Jul 22, 2022

ah. so it must physically print?

 

Translate
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 ,
Jul 22, 2022 Jul 22, 2022

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.

Translate
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 ,
Jul 25, 2022 Jul 25, 2022

So where will it print? will it show a prompt for the user? ive seent here is a way to silent print. is that possible?

Translate
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 ,
Jul 25, 2022 Jul 25, 2022
LATEST

Yes, it will prompt the user to enter the file name for each file.

The silent printing command only applies to showing the Print dialog, not to this.

Translate
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