Highlighted

I need to open a PDF in browser and have it print automatically

New Here ,
Nov 02, 2020

Copy link to clipboard

Copied

Hello, it looks like this is possible, as i've found numerous examples of how to do this, but it seems like Acrobat DC makes this prohibitively difficult compared to all the tutorials I've found. So far, i've tried to open the document, open the action wizard, create a new action to execute javascript, and added a javascript file with the following code:

 

function printOnOpen() {
  this.print({bUI: false, bSilent: true, bShrinkToFit: true});
}
printOnOpen();

 

But when I click "Start" acrobat fails on me. Any tips?

 

Thanks

TOPICS
Acrobat SDK and JavaScript, Print and prepress

Views

26

Likes

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

I need to open a PDF in browser and have it print automatically

New Here ,
Nov 02, 2020

Copy link to clipboard

Copied

Hello, it looks like this is possible, as i've found numerous examples of how to do this, but it seems like Acrobat DC makes this prohibitively difficult compared to all the tutorials I've found. So far, i've tried to open the document, open the action wizard, create a new action to execute javascript, and added a javascript file with the following code:

 

function printOnOpen() {
  this.print({bUI: false, bSilent: true, bShrinkToFit: true});
}
printOnOpen();

 

But when I click "Start" acrobat fails on me. Any tips?

 

Thanks

TOPICS
Acrobat SDK and JavaScript, Print and prepress

Views

27

Likes

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
Nov 02, 2020 0
try67 LATEST
Most Valuable Participant ,
Nov 02, 2020

Copy link to clipboard

Copied

Do you want the Action Wizard to print the files, or do you want it to embed the code to print them when opened?

If the latter, that's not how you do it. You need to use the addScript method.

Likes

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
Reply
Loading...
Nov 02, 2020 0