Expand my Community achievements bar.

printing issues while using java code

Avatar

Level 4

good day everyone,

Im stuck on a silly issue that has to do with printing using java and i can't wrap my head around the why its behaving like this.

What i do is i hide a few pages on initialize to basically endup with only 1 page showing out of 6.

On that solo page i have a print button i would like to use.

Under the click command i want to show all my pages temporarlly and then print and hide them again.

Right nowi have this code to do the un-hide and activate the print function:

  form1.Header1.presence="visible";

  form1.Page1.presence="visible";

form1.Page2.presence="visible";

form1.Page3.presence="visible";

form1.Page4.presence="visible";

form1.Page5.presence="visible";

  xfa.host.print(1,"1","5",0,0,0,0,0);

So when i press the button, the pages show up but nothing happens, i dont see the print dialog. But if i press on the print button another time, it will work.

Its almost liike i would need to do this for it to work properlly:

xfa.host.print(1,"1","5",0,0,0,0,0);

xfa.host.print(1,"1","5",0,0,0,0,0);

But im guessing that this is just something im doing wrong, but i cant see why it justs doesnt work on the first try.

Anyone can point to what is happening or what needs fixin? I just dont see it

Thank you very much again for all the help.

1 Reply