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

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

New Here ,
Jul 21, 2022 Jul 21, 2022

Copy link to clipboard

Copied

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

Views

1.3K

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

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);

Votes

Translate

Translate
Community Expert ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

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);

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

Copy link to clipboard

Copied

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.

 

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

Copy link to clipboard

Copied

-Yes.

-Not possible.

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

Copy link to clipboard

Copied

ah. so it must physically print?

 

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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?

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

Copy link to clipboard

Copied

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.

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