[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] [FO] image on even, table on odd, repeating image if the table is more than one page

Subject: Re: [xsl] [FO] image on even, table on odd, repeating image if the table is more than one page
From: Michael.Hahn@xxxxxxxxxxxxxxxxxxx
Date: Wed, 11 Jul 2012 11:31:36 -0500

What about creating a header area on the even pages to allow both the real 
header and the image?  The OP's original question specified one image per 
table, so a reference to the url() could specify the image associated with 
the table.  (We do something similar with "This page intentionally left 
blank" centered on the blank pages.)

Michael R. Hahn
Technical Publications


"G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote on 07/11/2012 
07:01:55 AM:

> At 2012-07-11 13:32 +0200, Geert Bormans wrote:
> >I have a part list table that I need to show on the odd page of a PDF
> >I have an image that goes with the part list, that I have to show on 
> >the even page.
> >In case the table breaks over multiple pages, I need to keep the 
> >table on the odd pages only
> >and I need to repeat the image on each opposite even page.
> >
> >Does anyone have an idea on how to do this?
> I think this can be done with markers, but I haven't got the time 
> this morning to write up a working mock-up:
>   (1) - create a page sequence master that alternates the odd page 
>         a body region for content with the even page having a body 
>         without content ... this will flow the table on only the odd 
>   (2) - in a perimeter region for the even page, create an absolute 
>         container the same size as odd-page-body-region, and in 
>         retrieve, in order, one marker for each diagram that might be
>         needed by the table
>   (3) - define all diagram markers as empty
>   (4) - when flowing the table, put the image associated with content 
>         that diagram's marker, clearing out the marker when the diagram 
>         no longer relevant
> >I would prefer something that works with FOP
> >If this can't be done with FOP, please suggest an alternative
> Your requirement is quite particular ... off the top I cannot think 
> of an alternative.  And I haven't tested the above, but I would write 
> my test following those steps.
> Sadly, having written out the algorithm I worry this won't work 
> because the markers are defined in the flow *after* the page on which 
> you want the images ... I now think the above steps will put the 
> images on the even page *after* the odd page, which is not what you 
> You may be out of luck.  There is no "look ahead" in XSL-FO ... I 
> can't see a way of knowing what to put on page "n" based on content 
> on page "n+1".
> No problem with the odd-page-only table flowing ... I just think you 
> can't get the images to work.
> I hope this helps, even if it isn't a solution, in that I hope it 
> helps to know that there may not be a pure XSL-FO solution.  With 
> post-processing you might be able to swap pages in some way ... but I 
> think that would be untenable.
> . . . . . . . . . . . Ken
> --
> Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
> 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/s/
> G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
> Google+ profile: https://plus.google.com/116832879756988317389/about
> Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

Current Thread