[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [FO] Background image on whole page

Subject: Re: [FO] Background image on whole page
From: Vincent Hennebert <vincent.hennebert@xxxxxxxxxxxxxxxx>
Date: Thu, 10 Jan 2008 11:34:01 +0000
 Re: [FO] Background image on whole page
>> 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:
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="page"
          page-height="29.7cm" page-width="21cm"
          margin-top="2cm" margin-bottom="2cm"
          margin-left="3cm" margin-right="3cm">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <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"
            background-image="path/to/the/image.png">
            <fo:block/>
          </fo:block-container>
          <fo:block>
            The document starts here...
            ...
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>

HTH,
Vincent


--
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.