I'm struggling with an issue of usability.
I have a complex form which increases in size when the user enters more text - many pages where there are info boxes of text that are hidden when printing - this has a knock on effect that page numbers on screen don't match page numbers when printing.
I got help from Radzmar (thank you!) who gave me the code for a print button that prints a section rather than a page number span; so when the user clicks the button:
var vObj = xfa.resolveNode("form1.summary"),
vPageStart = xfa.layout.absPage(vObj),
vPageEnd = vPageStart + xfa.layout.absPageSpan(vObj) - 1;
xfa.host.print(1, vPageStart.toString(), vPageEnd.toString(), 0, 0, 0, 0, 0);
...the form will print the contents from my section 'form1.summary'
However, thinking about usability, it would make sense to have a button that opened a dialogue box which gave the user immediate options. At any one time there would be three options:
1. To print just the page they are looking at
2. To print the section they are on
3. To print the entire document
In plain english the dialogue box should say something like:
Title: Printing Options
Message: 'You have several options for printing'
Button One text: 'Print this page only'
Button two text: 'Print this section only (name of section goes here, such as 'Core Data', 'Assessment' etc.)
Button three text: 'Print the entire document'
Button four: Cancel
I'm new to scripting and using the script editor doesn't give me enough options to edit a message box so I'm wondering if someone could help please.
I should also mention that the end product here is a pdf form which needs to work through acrobat reader without necessarily being online.