- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi Faraz,
That's the problem, you cannot specify a print range with gaps.
xfa.host.print(1, "0", "7", 0, 1, 0, 0, 0);
The second parameter specifies the start page (based on a zero numbering system). Therefore "0" will print from page 1 of the form.
The third parameter specifies the last page to be printed. Therefore "7" will print page 8 of the form.
Here is a sample of the only workaround I can think of. Basically the button opens the print set up dialogue (not the standard print window). This allows the user to select the correct printer and settings. Then the script looks at each page in turn and prints is as a standalone print job. If you look at the print command you will see that the first parameter is set to "0", this is to print the page without displaying the print dialogue. The fourth parameter is now set to "1" to prevent the user cancelling the print job. If you look at the help file you will get a full description of the print command and all eight parameters.
xfa.host.print(0, "0", "0", 1, 1, 0, 0, 0);
Hope that helps,
Niall
Views
Replies
Total Likes