cancel
Showing results for 
Search instead for 
Did you mean: 

how to print Next page number on the current page

Former Member
0 Kudos

Hi ,

Can you please tell me how to print the text with  next page number on the adobe form ?

Example : Lets say I have 3 pages getting printed. On the First page the text should be printed as "Continued on Page2" and on the

second Page the text should be printed as " Continued on Page3".

Nothing should be printed on Page3 as it is the last page.

I understood that this should be handled through script editor. I have done some trial and error in Form Calci, but not able to do it.

Can you Please help me out?

Best regards,

Karthik Ganti.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Can anyone help me out in acheieving the above?

Best regards,

Karthik Ganti.

Former Member
0 Kudos

Hello Karthik,

You can achieve this Javascript in the ready form method.

var count  =  xfa.layout.page(this);

var current_count = count + 1;

this.rawValue = Concat("Continued on Page", current_count)

Former Member
0 Kudos


Hi Madhu,

Thank you. But I was not able to  achieve it. I have tried the below code in Layout ready event.

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

But after writing the above code,  if there are 3 pages, On the 3rd page also the text " Contined on Page 4"  is printing. But it should not happen for me as there are only 3 pages.

On the last page the text should not be printed. Therefore I have modified my code and written in Layout event.Below is my code.

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


var count = xfa.layout.page(this);


if ( count > this.rawValue );

{

this.rawValue = xfa.layout.page(this) + 1;
}

else;
{

this.presence = "hidden";

}

But the above code is not working.

Could you Please help me in correcting the code.

Best regards,

Karthik Ganti.





Former Member
0 Kudos

Hi Madhu,

I have also tried changing the code as below. But still it didnot work.

var tot_count = xfa.layout.pageCount();


var count = xfa.layout.page(this);


if ( tot_count > count );


{

this.rawValue = xfa.layout.page(this) + 1;
}

else;
{

this.presence = "hidden";

}

Could you please help me out ?

Best regards,

Karthik Ganti.

Former Member
0 Kudos

Hi ,

Solved the problem with the below code. Thanks.


var count = xfa.layout.pageCount();
this.rawValue = xfa.layout.page(this) + 1;
if ( this.rawValue > count )
{
this.presence = "hidden";
}
else
{
this.presence = "visible";
}

Best regards,

Karthik Ganti.












Former Member
0 Kudos

Hi Karthik,

Sorry i was not able login in scn from 2 days!!!

Its is good, you have solved the issue by your own  

If your issue is resolved please close the discussion ....

Answers (0)