Hi,
I'm looking for a script that will just print the last page in a document. My form has one repeating subform, and based on the way I have it setup, the last instance (which always lands on the last full page) is the one I need the user who opens the form to be able to print with one click of the print button. This will help prevent them form having to indicate the page to be printed in the print window.
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
The print method has eight parameters, which you can change to affect the printing. The second parameter is the start page and the third parameter is the finish/last page to be printed.
All you need to do is replace the second parameter "0", with the default third parameter (xfa.host.numPages -1).toString().
This should work:
xfa.host.print(1, (xfa.host.numPages -1).toString(), (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
The print method has eight parameters, which you can change to affect the printing. The second parameter is the start page and the third parameter is the finish/last page to be printed.
All you need to do is replace the second parameter "0", with the default third parameter (xfa.host.numPages -1).toString().
This should work:
xfa.host.print(1, (xfa.host.numPages -1).toString(), (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
Hope that helps,
Niall
Views
Replies
Total Likes
Works great. Thank you.
S
Views
Replies
Total Likes