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

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

New Here ,
Nov 02, 2020 Nov 02, 2020

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
376
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 ,
Nov 02, 2020 Nov 02, 2020
LATEST

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.

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