Sorry for late reply. Couldn't you just add the static page as a 2nd page sequence? Then it will always occur after the first sequence of pages regardless of whether there is 1 or 2.
Chris On 29/11/2017 05:59, gauravabburi wrote: > I am trying to generate a PDF with multiple pages. I have a static page 2 > which is to be generated even when there is no overflow from page 1. > However, that is not happening. > In case there is an overflow from page 1, I want it to be displayed in page > 3. > Page 1 -> "first" > Page 2 -> "terms" - static page > Page 3 -> "rest" - overflow from Page 1 > Code snippet : > > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" > xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" > xmlns:th="http://www.thymeleaf.org"> > <fo:layout-master-set> > > <fo:simple-page-master master-name="first" > th:attr="page-width=${dimensions.width} + > 'in',page-height=${dimensions.height} + 'in',margin-right=${rightMargin} + > 'in',margin-left=${leftMargin} + 'in'" > margin-top="0pt" margin-bottom="1in"> > <fo:region-body region-name="xsl-region-body" margin-top="3.4in" > margin-bottom="0.375in"/> > <fo:region-before region-name="stmt-header" margin-top="0.5in"/> > <fo:region-after region-name="stmt-footer"/> > </fo:simple-page-master> > > > <fo:simple-page-master master-name="rest" > th:attr="page-width=${dimensions.width} + > 'in',page-height=${dimensions.height} + 'in',margin-right=${rightMargin} + > 'in',margin-left=${leftMargin} + 'in'" > margin-top="0pt" margin-bottom="1in"> > <fo:region-body margin-bottom="0.375in" margin-top="1in"/> > <fo:region-before region-name="stmt-header-1" > margin-top="0.5in"/> > <fo:region-after region-name="stmt-footer"/> > </fo:simple-page-master> > > > <fo:simple-page-master master-name="terms" > th:attr="page-width=${dimensions.width} + > 'in',page-height=${dimensions.height} + 'in',margin-right=${rightMargin} + > 'in',margin-left=${leftMargin} + 'in'" > margin-top="0pt" margin-bottom="1in"> > <fo:region-body margin-top="10in" margin-bottom="0.1in"/> > <fo:region-before region-name="stmt-terms" margin-top="0.5in"/> > <fo:region-after region-name="stmt-footer-1"/> > </fo:simple-page-master> > > <fo:page-sequence-master master-name="Statement"> > > > > > > <fo:single-page-master-reference master-reference="first"/> > <fo:single-page-master-reference master-reference="terms"/> > <fo:repeatable-page-master-alternatives> > <fo:conditional-page-master-reference > master-reference="rest" page-position="rest"/> > </fo:repeatable-page-master-alternatives> > </fo:page-sequence-master> > > </fo:layout-master-set> > > > > <fo:page-sequence master-reference="Statement" id="stmt"> > > <fo:static-content flow-name="stmt-header"> > <th:block th:include="header-logo :: header-logo"/> > </fo:static-content> > > <fo:static-content flow-name="stmt-header-1"> > <th:block th:include="header-logo :: header-logo-1"/> > </fo:static-content> > > <fo:static-content th:with="footer_margin_left=1.7" > flow-name="stmt-footer"> > <th:block th:include="footer"/> > </fo:static-content> > > <fo:static-content th:with="footer_margin_left=0" > flow-name="stmt-footer-1"> > <th:block th:include="footer"/> > </fo:static-content> > > <fo:static-content flow-name="stmt-terms"> > <th:block th:include="stmt_terms :: stmt-terms"/> > </fo:static-content> > > <fo:flow flow-name="xsl-region-body"> > <th:block th:include="${templateLayoutContent} :: stmt-body"/> > </fo:flow> > > </fo:page-sequence> > > </fo:root> > > > > > -- > Sent from: http://apache-fop.1065347.n5.nabble.com/FOP-Dev-f18203.html > . >