Skip to main content
Turan_Elkhan
Inspiring
Jun 6, 2023 2:10 AM UTC
Question

How to set printer back to default without reopen Adobe Reader

Hello community. I am trying to print with the code below my PDF form using "Microsoft Print to PDF" and after printing (saving as a flattened image file) it should set the printer to default (any printer) but not works. Can anyone help me?

 

Thanks in advance

 

var defaultPrinterName = this.getPrintParams().printerName;
var pp = this.getPrintParams();
pp.printerName = "Microsoft Print to PDF";
pp.NumCopies = 1;
pp.DuplexType = pp.constants.duplexTypes.Simplex;
pp.pageHandling = pp.constants.handling.fit;
pp.printRange = null;
pp.interactive = pp.constants.interactionLevel.silent;
this.print({ bUI: false, bSilent: true, bShrinkToFit: true, printParams: pp });
pp.printerName = defaultPrinterName;

 

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Turan_Elkhan
Inspiring
Jun 18, 2023 9:14 PM UTC

No solution?

Translate
JR Boulay
Community Expert
Community Expert
Jun 6, 2023 8:29 AM UTC

[MOVED TO THE ACROBAT READER DISCUSSIONS]

Translate
Acrobate du PDF, InDesigner et Photoshopographe