cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Master Pages dynamically / programmatically

Former Member
0 Kudos

Hi there,

does anybody know if there is a way to hide master pages programmatically?

Situation: I've built a PDF that contains two master pages. First page contains common master data. The second page contains confidential information which must only be visible for special users.

Is it possible to hide the second master page if a certain interface field is set to a certain value?

Thanks in advance,

Eike Menking

Accepted Solutions (0)

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Why did you build the "master page" with confidental data as "master page" anyway? It can be an ordinary part of the form, based on the master page. Then you can easily hide a subform, not a master page. To ensure it will land on a separate page, you can work with the pagination tab (top of next page).

Regards Otto

Former Member
0 Kudos

Hi Otto,

I didn't build the confidential second master page. It came from the customer and I just used the template. The request to hide the second master page depending on the user was not foreseeable for me.

Additionally: the second master page has a completely different layout than the first one. So until today's morning it was reasonable to use two different master pages.

In fact I have already been thinking about change the layout to one master page + several subforms. But I don't have a good mind to change the whole layout, think about how to set different headers and footers on the not-first pages and so on.

So my question is still: Is there a way to hide master pages programmatically?

Regards, Eike Menking

OttoGold
Active Contributor
0 Kudos

So my answer is: I don´t think so. You hide the page if you don´t use it at all.

That leads me to an idea. You can create a dummy subform, it does not have to have any content, just a dummy rectangle. For this dummy you will set the pagination the way this dummy will appear with the confidental master "background" (but since there will be no foreground, it will look like the content of the page, right?:))). And you will control (through scripting) if this dummy little friend should appear on your layout. If (condition) { dummy.presence = "visible"; } which will make the secret come visible without any big change to the form.

I wonder if you like the workaround:)) Regards Otto

Former Member
0 Kudos

Hm, sounds interesting. I think I will give it a try next week. I will tell you the result.

Thank you.

Regards, Eike