Hello.
I have created a multipage Static form using Livecycle and there is a problem with printing the current page.
We use a multiple page form that I have added Print Buttons to each page in the form so users do not end up printing out every page when they print. When the Print Dialogue screen opens the page range is correct but it always ends up printing out all the pages anyway. If I reselect a printer then it will work correctly and print out the pages in the desired range. Is this a bug?
Do I always have to print by Page range? I think that is the problem. Is there a script to print the current page you are on without entering in page ranges in the script?
Thanks for all your help.
Biff
Here's some scripts I use. I don't know if it will make a difference
on the Mac or not.
Are you using xfa.host.print()?
For a list of the variables for xfa.host.print() check the help under:
Scripting > Scripting Reference > Scripting Methods > printThe main thing to remember is that the page numbers are zero-based; so
page 1 is page zero in Javascript.
The following will print the page that the button is on:
var thisPage = xfa.layout.page(this);
xfa.host.print(1, (thisPage-1).toString(), (thisPage-1).toString(), 0,
0, 0, 0, 0);
You can do this for specific ranges of flowing forms too by setting up
a field to track the value of a page number. I've set up a few forms
that flow and can add quite a few pages which have a page or two of
instructions that follow the form pages. I have a print button that
prints the form pages without the instructions and a print button on
the instruction pages that will just print the instructions.
To do this I put an invisible numeric field at the end of the subform
flow called thisPage with the following on the Layout:Ready event of
the field:
this.rawValue = xfa.layout.page(this);
Then on the print buttons (which I have on the master pages - 1 master
page for the form and 1 master page for the instructions) I have the
following:
This will print from page 1 to the page the tracking field is on (the
form pages):
xfa.host.print(1, "0", (path.to.subform.thisPage.rawValue-1).toString
(), 0, 0, 0, 0, 0);
This will print from the page after the tracking field is on to the
end of the document (the instruction pages):
xfa.host.print(1, (path.to.subform.thisPage.rawValue).toString(),
"0" , 0, 0, 0, 0, 0);