Re: [xsl] Re: [FO] Background image on whole page

Subject: Re: [xsl] Re: [FO] Background image on whole page
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Jan 2008 07:20:08 -0600
At 2008-01-10 11:34 +0000, Vincent Hennebert wrote:
>> Each region can have its own background, so you can use
>> background-image= on <region-body>.
>> To get "the whole page" you will need to have the body region extend
>> to the page dimensions, which is not really desirable for top and
>> bottom margins.
> Yes, I noticed.
>> An alternative is to parcel out a whole page background into bits
>> that are set as the backgrounds of the respective perimeter regions
>> and body region.
> <sigh> I was hoping you wouldn't say that. Oh well. I guess I will chalk
> that up as something else XSLFO can't do.

Well you can also use an absolutely positioned block-container with
a background-image; for example:

Considering section 4.9.6 of the specification, I'm not confident this is guaranteed to work as desired by the original poster.

      <fo:page-sequence master-reference="page">
        <fo:flow flow-name="xsl-region-body">
          <fo:block-container absolute-position="absolute"
            top="-2cm" left="-3cm" width="21cm" height="29.7cm"

Perhaps adding z-index="-1" to the above will change the stacking layer sufficiently that the following blocks are not in conflict ... but your example of putting this a the start of the flow means that the background image is only going to be on the first page and not on every page.

If you then make the decision to move the specification of the absolutely-positioned block container to one of the perimeter areas and static content, so that it appears on every page, there may still be a problem: someone on the committee told me that there is no guarantee that the unspecified z-index of a perimeter region is less than the unspecified z-index of the body region.

Perhaps a combination of the block-container, in a perimeter region, with a lower z-index than the content of the body region (which 7.30.18 implies is zero) would do the trick. I'd appreciate it if someone on the committee would comment on this.

. . . . . . . . . . . . . . . Ken

Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07
Legal business disclaimers:

Current Thread