Loading ...
Sorry, an error occurred while loading the content.

RE: [XSL-FO] Rendering on only the odd pages:

Expand Messages
  • Klaas_Bals@inventivedesigners.com
    ... I got a non-public answer. As more people might have had the same problem, I ll post it in the mailing list as well... ... FOP doesn t seem to support the
    Message 1 of 3 , Apr 24, 2003
    • 0 Attachment
      > > >I was wondering is there a way to force only
      > > > rendering to the odd page, and leave the even pages blank? > Klass:

      I got a non-public answer. As more people might have had the same problem,
      I'll post it in the mailing list as well...

      > I read you previous post, though I am getting into some
      > problems. FOP can not handle <...margin="3cm"/>, nor does it know
      > how to handle <....extent="100%"/>. Do you have another example you
      > could send me?

      FOP doesn't seem to support the margin shorthand. Here is another example,
      with both approaches illustrated:

      <?xml version="1.0" encoding="UTF-8"?>
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
      <!--
      Approach 1: Have a margin on even pages that is
      that big, such that nothing fits on the even
      pages anymore.
      -->
      <fo:simple-page-master master-name="odd" page-width="595.25pt"
      page-height="841.85pt">
      <fo:region-body region-name="reg-body" />
      </fo:simple-page-master>
      <fo:simple-page-master master-name="even" page-width="595.25pt"
      page-height="841.85pt" margin-top="841.85pt">
      <fo:region-body region-name="reg-body" />
      </fo:simple-page-master>

      <!--
      Approach 2: Have two different names for the region-body
      elements. Create a flow for only one of them.
      Doesn't seem to work with FOP

      <fo:simple-page-master master-name="odd">
      <fo:region-body region-name="reg-body-odd" />
      </fo:simple-page-master>
      <fo:simple-page-master master-name="even">
      <fo:region-body region-name="reg-body-even" />
      </fo:simple-page-master>
      -->

      <fo:page-sequence-master master-name="alternating">
      <fo:repeatable-page-master-alternatives>
      <fo:conditional-page-master-reference odd-or-even="odd"
      master-reference="odd" />
      <fo:conditional-page-master-reference odd-or-even="even"
      master-reference="even"/>
      </fo:repeatable-page-master-alternatives>
      </fo:page-sequence-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="alternating">

      <fo:flow flow-name="reg-body">
      <!--
      Approach 2: Define a flow for only 1 region-body
      <fo:flow flow-name="reg-body-odd">
      -->
      <fo:block>Test text in flow.1 </fo:block>
      <fo:block>Test text in flow.2 </fo:block>
      ...
      <fo:block>Test text in flow.318</fo:block>
      <fo:block>Test text in flow.319</fo:block>
      </fo:flow>
      </fo:page-sequence>
      </fo:root>


      Does this work out?
      -----
      Klaas Bals - Scriptura Development Manager

      Scriptura - a WYSIWYG XSL-FO editor: www.inventivedesigners.com/scriptura

      Inventive Designers
      Direct Phone: +32 - 3 - 8210183
      Office Phone: +32 - 3 - 8210170
      Office Fax: +32 - 3 - 8210171
      Email: Klaas_Bals at inventivedesigners dot com
    Your message has been successfully submitted and would be delivered to recipients shortly.