My form has two master pages (labeled "Part A" and "Part B". I added all the objects that start at the top of master page 1 in one subform and all the objects that start at the top of master page 2 in another separate subform. Can I script a button to only print the pages created in master page 2 (Part B)?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi there,
you can go on the prePrint event of PartA and hide that part and then on the postPrint just put it back visible.
Otherwise if you script it in the print button, if the user doesn't use the button but press the Ctrl+P, it will print both parts
Hope this help!
Views
Replies
Total Likes
Hi there,
you can go on the prePrint event of PartA and hide that part and then on the postPrint just put it back visible.
Otherwise if you script it in the print button, if the user doesn't use the button but press the Ctrl+P, it will print both parts
Hope this help!
Views
Replies
Total Likes
So simple... it's genius!
Thank you so much!
Views
Replies
Total Likes
The problem I am having is when trying to hide Master Page Part A, it does not hide. Even when manually tring to hide it using the Object pallet. I assume I have to hide both the subform Part A and the Master page Part A but it will not work.
Views
Replies
Total Likes
You should instead hide the page in the PDF that is inheriting from the master page,
It is a bit hard to work with master pages on runtime, some errors may occur when it is modified once.
Views
Replies
Total Likes
The custom print button works fine to print Part A only (button is at the bottom of Part A). When I create the same button at the bottom of Part B, the Part A button stops working correctly and the Part B button only prints the Part A header. Can't figure this out. If i remove the Part B print button, the Part A button goes back to working correctly.
Views
Replies
Total Likes
Ahh, well if you rather have a print button for each parts, you better remove the script in prePrint and postPrint and hide the parts needed within the buttons instead.
Views
Replies
Total Likes
I realized this morning that putting the hide scripts in the prePrint and postPrint events of both buttons made them all run when clicking either print button. I changed the scripts to run before and after the print script in the click evenets (example below) and it works great now!
Thank you for your help!
this.resolveNode("PartA").presence = "hidden";
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
this.resolveNode("Form1.PartB").presence = "visible";
this.resolveNode("Form1.PartA").presence = "visible";
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies