Master page was printed

Avatar

Avatar

Jing_Luo

Avatar

Jing_Luo

Jing_Luo

05-09-2014

Hi everybody,
I have a javascript to control a page named "Blank" to display in my form .The "Blank" page is not included in page Numbering. Here is the java code:

var myCount = xfa.layout.pageCount();
if(myCount%4 > 0){
this._Blank.setInstances(4-(myCount%4));
var myPages = this.resolveNodes("Blank[*]");
for(var q=0; q<myPages.length; q++){
  myPages.item(q).presence = "visible";
}
}else{
this._Blank.setInstances(0);
}

When I open the pdf , the page number is 17,so the Blank page needs to dispay (3 pages). It works functionally.
When I print the pdf , there are some hidden pages need to display(3 pages). So the Blank page do not needs to display. But now the pdf adds a extra blank page in my form . I test it is the Blank's Master Page .

Can someone help me?

Thanks a lot .
Jing

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jing_Luo

Avatar

Jing_Luo

Jing_Luo

11-09-2014

Hi,

I think I fixed the issue…

I add 3 Blank pages in my form instead of using a repeat Blank page.

Here is the first Blank page's  calculate event javascript :

var myCount = xfa.layout.pageCount();
var blankNumber = 4-(myCount%4);

xfa.layout.relayout();

if(blankNumber >0 && blankNumber<4)
{
this.presence = "visible";
}else{
this.presence = "hidden";
}

The  second Blank page's code should only change the "if(blankNumber >0 && blankNumber<4)" to "if(blankNumber >1 && blankNumber<4)",

The third Blank page's code should only change the "if(blankNumber >0 && blankNumber<4)" to "if(blankNumber >2 && blankNumber<4)",

Thanks,

Jing

Answers (0)