Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Duplex Printing - Odd Page Issue

Avatar

Level 1

I'm using the following logic to avoid printing subsequent form's details on previous one, it seems to work fine in most of the cases but for some of the data input the logic is not working, I've placed some debug statements and found out that at the time of layout ready event pageCount%2 == 0 is yielding an even number so the logic is going into else block but when the form is rendered finally I'm not getting the total page count as even. I'm not sure asto why there is a mismatch between pagecount at the layOut ready event.  Have any of you guys run into the same issue? I appreciate any suggestions.

if(pageCount%2 == 0) {

    //even, show the blank page to shift the trailing page down to an odd page number

    form1.blank_page.presence="visible";

} else {

    //odd, hide the blank page as the trailing page is already on an odd page number

    form1.blank_page.presence="hidden";

}

0 Replies