Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

show and hide pages

Avatar

Level 2

Hi all,

I'm trying to understand how the visibilty script works and was wondering if someone can help me understand whats going on here.

I have a form with 2 pages.  By default page 1 is visible and page 2 is hidden.  I have a script in prePrint which makes page 2 visible and page 1 hidden.  However in the print dialog box there is still two pages avaliable to print.  One is a blank page and the other is the page that has become visible after script in the prePrint area.  I've uploaded the pdf for people to have a look at.

Is there away to make that blank page completely hidden so it doesn't appear when printing?  Essentially only one page is avalible to print.

Link to pdf file

The script I have in prePrint is:

xfa.resolveNode("Page1").presence = "hidden";
xfa.resolveNode("Page2").presence = "visible";

2 Replies

Avatar

Former Community Member

Although you have hidden the content on the page the Master Page is still present and that is what you are seeing. Unfortunately you cannot hide the 1st occurance of the 1st Master Page .

Paul