"Print" key requires a second click to print after changing the presence of another page for visible

I have trouble getting a "print key" executing the two lines of code.  I need to make the second page in a printable form and then print, it makes page 2 visible but then when the print dialogue box appears only one page is page 1.  Can I get to run one after the other in one click?  I played with the pre-press, and no luck there.  Page2 is set to hidden again on the postPrint which works very well.

I created a very simple version of this problem, 2 pages, page 2 has the value hidden on initialize.  On page 1 is a button with only this code to the click event:

event: click

Pg2.presence = "visible";

XFA. Host.Print (1, "0", (xfa.host.numPages - 1) m:System.NET.SocketAddress.ToString (), 0, 0, 0, 0, 0);

And she still only page 1 in the print dialog box, even if on the insight behind this pop-up window, I can see that the document now has 2 pages long!  What I'm missing here?

Thank you

Try this:

Pg2.presence="visible";
var MyDoc = event.target;
var pp = MyDoc.getPrintParams();
var fv = pp.constants.flagValues;
pp.flags |= (fv.setPageSize);
pp.pageHandling = pp.constants.handling.none;
MyDoc.print(pp);

Let me know if all of the settings of your printer still work with that (including printing annotated, as you set it to false and the default value true).

Kyle

Tags: Adobe LiveCycle

Similar Questions

Maybe you are looking for

  • How can I delete a lot of my Firefox browser.

    I use a Mac version of office 10.6.8. On the advice of my Councillors ISP and Apple they said to uninstall Firefox, and then reinstall a new version and that should not a lot as the opening page. Have tried several times the online instructions but w

  • Satellite M30, the processor speed?

    Hello I received my laptop Toshiba m30 pentium 1.6 m John Lewis back after replacing the LCD screen. After using it for a few hours last night, I realized the fan did not come at once.I checked the speed of the cpu and it is fixed at 600 mhz. I can't

  • formulated differently: 10G OCP can upgrade to 11G OCP (1z0-050 or 1z0-034) and be always active, correct?

    The sentence differently: 10G OCP can upgrade to 11G OCP (1z0-050 or 1z0-034) and be always active, correct?They should NOT put just to 12 c, correct.Someone at work took the Oracle class in Chicago: Oracle 11 g new Featurers for administrators.They

  • PS icon Office replaced by large question mark

    The usual CC of Photoshop icon on my desktop (Mac 10.9.5) has been replaced by a big question mark. Open PS, must now go toApplications, Adobe Photoshop and then click Adobe Photoshop CC2015 to open it. Why what happened?

  • Upgrade to vSphere client 5.1 U1 but using vCenter/ESXi 5.1 (not U1)

    So I saw this recommendation from VMware:-----------The sequence for vSphere 5.1 update update 1 and their compatible VMware product (2037630)If you are using vSphere Client in your environment, it is recommended that you upgrade the vSphere Client t