using all page masters in a sequence

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

using all page masters in a sequence

Paul Tyson
Is it possible to force a page-sequence to consume all the
non-repeatable page-masters listed in its reference
page-sequence-master?

I can have 1-n page-masters, but there might only be enough content to
generate m pages. I want to use up all the page-masters (with blank flow
content) for pages m+1 through n.

More than n pages will use the repeatable-page-master at the end of the
sequence.

So I might have:

<fo:page-sequence-master master-name="the-page-sequence">
  <fo:single-page-master-reference master-reference="master-1"/>
  <fo:single-page-master-reference master-reference="master-2"/>
  <fo:single-page-master-reference master-reference="master-3"/>
  <!-- through master-n -->
  <fo:repeatable-page-master-reference master-name="master-0"/>
</fo:page-sequence-master>

And then:

<fo:page-sequence master-reference="the-page-sequence">
  ...
  <fo:flow>
    <!-- long or short content -->
  </fo:flow>
</fo:page-sequence>

I am almost resigned to estimating vertical space required to fill n
pages and adding that to the flow content, but thought I would ask to
see if I am missing something, perhaps involving
fo:conditional-page-master-reference and force-page-count.

(Yes, this would be better handled using independent region-bodies with
separate content flows, but FOP does not support that yet.)

Thanks and regards,
--Paul


Reply | Threaded
Open this post in threaded view
|

Re: using all page masters in a sequence

G. Ken Holman
No, within the bounds of the standard the only way to create pages is
to have enough flow to require them, or to trigger blank pages by
forced page counts or flow in subsequent non-blank pages.

Using an intermediate format, such as RenderX's, you could easily
determine using XSLT how many pages have flow are in the resulting
area tree and so how many pages to inject to make up your count.

I hope this helps.

. . . . . . . . Ken

At 2014-02-14 16:34 -0600, Paul Tyson wrote:

>Is it possible to force a page-sequence to consume all the
>non-repeatable page-masters listed in its reference
>page-sequence-master?
>
>I can have 1-n page-masters, but there might only be enough content to
>generate m pages. I want to use up all the page-masters (with blank flow
>content) for pages m+1 through n.
>
>More than n pages will use the repeatable-page-master at the end of the
>sequence.
>
>So I might have:
>
><fo:page-sequence-master master-name="the-page-sequence">
>   <fo:single-page-master-reference master-reference="master-1"/>
>   <fo:single-page-master-reference master-reference="master-2"/>
>   <fo:single-page-master-reference master-reference="master-3"/>
>   <!-- through master-n -->
>   <fo:repeatable-page-master-reference master-name="master-0"/>
></fo:page-sequence-master>
>
>And then:
>
><fo:page-sequence master-reference="the-page-sequence">
>   ...
>   <fo:flow>
>     <!-- long or short content -->
>   </fo:flow>
></fo:page-sequence>
>
>I am almost resigned to estimating vertical space required to fill n
>pages and adding that to the flow content, but thought I would ask to
>see if I am missing something, perhaps involving
>fo:conditional-page-master-reference and force-page-count.
>
>(Yes, this would be better handled using independent region-bodies with
>separate content flows, but FOP does not support that yet.)
>
>Thanks and regards,
>--Paul


--
Public XSLT, XSL-FO, UBL & code list classes: Melbourne, AU May 2014 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/f/ |
G. Ken Holman                   mailto:[hidden email] |
Google+ profile:      http://plus.google.com/+GKenHolman-Crane/about |
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal |