Here is my script to send a PDF to the default printer.
var pp = this.getPrintParams();
var fv = pp.constants.flagValues;
pp.flags = (fv.setPageSize=false);//Sets the Auto-Rotate and Center Flag
pp.interactive = 0;// 0=interactive, 1=auto, 2=silent
pp.pageHandling = 3;//3=shrink to fit
the problem is that my PDF has my desired Document Properites Print Dialog Preset "DuplexMode" set to Duplex Flip Short Edge, and that property is ignored if the interactive is set to silent or automatic. It is honored if the print dialog is prompted and the user enters "OK".
The pp.flags = (fv.setPageSize=false); seems to be undocumented, but I stumbled upon it and it produces the desired result (sets Auto Rotate and Center). I hope it may be helpful to others.
Any ideas why my preset is being ignored in silent mode, and any way to make it work?
Thank you in advance and Happy Holidays,
Message was edited by: kentgbaker Thom Parker was good enough to demonstrate the documented way to set auto-rotate and center. var pp = this.getPrintParams(); pp.flags &= ~pp.constants.flagValues.suppressCenter pp.flags &= ~pp.constants.flagValues.suppressRotate pp.interactive = 0;// 0=interactive, 1=auto, 2=silent pp.pageHandling = 3;//3=shrink to fit this.print(pp);