Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Can you create a "Print Page" button?

Avatar

Former Community Member
Is there any way to add a Print Page button, versus the Print Form button? My "Form" is 31 pages, only 8 of which are fillable. I'm thinking that I need to put a CAUTION note next to the button to advise Print Current Page only. Knowing how users are, I'm expecting negative feedback and a "Print Page only" button would solve the problem nicely.
4 Replies

Avatar

Former Community Member
Try this. It worked for me. On click add this string



xfa.host.print(X, "X", (xfa.host.numPages -Y).toString(), 0, 1, 0, 0, 0);



X is the page number you want to print Y is the X page number minus the total document pages.

Avatar

Former Community Member
Thank you so much! But this is odd. In my document, I want to print page 5 of 30 pages. So referencing your instructions, I set the "X" to 5 and "Y" to 30. This prints page 6. So I set X and Y to 4 and 26, and THAT prints page 5! Setting X and Y to 0 and 30 prints page 1. Don't care...it works! I'm very grateful for your help, Ebony.

Avatar

Former Community Member
Bean_Noldon@adobeforums.com wrote:

> Thank you so much! But this is odd. In my document, I want to print page 5 of 30 pages. So referencing your instructions, I set the "X" to 5 and "Y" to 30. This prints page 6. So I set X and Y to 4 and 26, and THAT prints page 5! Setting X and Y to 0 and 30 prints page 1. Don't care...it works! I'm very grateful for your help, Ebony.



The previous post was not entirely accurate. Open the Designer help, go to the Index, and find

"print method". This will explain all of the parameters to you in detail.



The reason your pages are off is because the pages are zero-based. So the first page is actually

page 0, the second is page 1, etc.





--

Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com

Avatar

Former Community Member
Justin, this is HUGELY beneficial! I'm so new to all this, it's baby steps all the way. I really appreciate this information. I can see right away that I would like to change the first parameter to the default "0" to not display a print dialog. Make the event as smooth as possible. Thank you so much.



Bean Noldon

U.S. Small Business Administration

bean.noldon@sba.gov