cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Page Numbers

Former Member
0 Kudos

Hello community

I have the following requirement: I have my page numbering embedded in the master page of my interactive form.

I have to hide this page numbers on the first and the last page of the document.

How can I achieve that? Where do I have to embed what FormCalc Code?

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

former_member189058
Active Contributor
0 Kudos

Hi Alexander,

In the Initialize Event write the following code.


var currPg = xfa.layout.page(this)
var pgCnt = xfa.layout.pageCount()

if (currPg == 1 or currPg == pgCnt)
  $.presence = "hidden"
  $.relevant = "-print"
endif

Regards,

Reema.

Former Member
0 Kudos

Thanks for your reply.

In what initialize event, the one of the Bodypage or the one of the UI Element in the Master Page?

former_member189058
Active Contributor
0 Kudos

Have you used the Page Number UI element??

How are you getting the page number on the pdf?

Former Member
0 Kudos

Currently I have a TextView Element embedded in the master page.

Coding in Master the Master Page in the ready:layout event:

this.rawValue=xfa.layout.page(this);

former_member189058
Active Contributor
0 Kudos

Hi Alexander,

write the formCalc code that I gave in the ready:layout event

Replace

 this.rawValue=xfa.layout.page(this); 

by

 $.rawValue = xfa.layout.page(this) 

The earlier one must be in javascript.

Regards,

Reema.

Former Member
0 Kudos

you are confusing me....

I have a TextView Element in the MASTERPAGE which has to be either displayed or hidden.

So in WHAT Page (Body Page or Masterpage) do i have to place the code?

currently it does not work.

former_member189058
Active Contributor
0 Kudos

Don't get confused.

You may check how the sequence in which the events are being called by simply putting a message box in the events.

Now if it doesnt work in the form ready event,

try puttin it in the initialize event of the textview

Reema

Former Member
0 Kudos

Thanks for your help, I figured it out!

former_member189058
Active Contributor
0 Kudos

great!! where did you finally paste the code??

Answers (0)