Expand my Community achievements bar.

PrintParams being ignored if Printer Preferences set

Avatar

Former Community Member

***Edit - Sorry I meant to post this in the ES / ES2 thread - I have posted a copy there with the attachment***

Hi,

I want to create a form which prints silently, and bypasses all settings such as scaling and Duplex settings - I've created a sample form (attached) with the following script on a button click event

var myDoc = event.target;

        var pp = myDoc.getPrintParams();

        // Insert your Printer name here ....

        pp.printerName = "Brother MFC-7420 USB Printer";

        pp.DuplexType = 1;

        pp.nUpNumPagesH = 1;

        pp.nUpNumPagesV = 1;

        pp.tileScale = 1;

        pp.tileOverlap = 0;

        pp.nUpAutoRotate = false;

        pp.reversePages = false;

        pp.interactive = pp.constants.interactionLevel.silent;

        sfmTop.txtPrintOP.rawValue = pp.toSource();

        myDoc.print(0, "0", (xfa.host.numPages - 1).toString(), 0, 0, 0, 0, 0, pp);

Problem is that if the user in Windows has Printer Preferences set then it appears that these override the settings passed in th pp object.

My client needs to ensure that Duplex and reversing is turned off, but it doesn't happen if the printer preferences have these set!

Many Thanks,

Tim

0 Replies