John Giotta
John Giotta

Reputation: 16984

fo:external-graphic That Spans Across Entire Page

I'm trying to mimic a design that overall has a 0.375in page margin, but the footer has a graphic that ignores those constraints and stretches across the entire page (left to right).

My first try was to set a left attribute -0.375in, but it still starts at the defined left margin of the page.

Should I just zero out left and right margins of the page and simply define the margins for the body region?

Upvotes: 1

Views: 194

Answers (1)

Tony Graham
Tony Graham

Reputation: 8068

Not specifying any margins for the fo:simple-page-master would be simplest.

Otherwise, you can set negative margins on an fo:block in the fo:static-content for your footer. You would possibly also need to adjust the fo:region-after/@extent to compensate for the bottom margin. E.g., for a 1in high graphic:

<fo:layout-master-set>
    <fo:simple-page-master master-name="spm" margin="0.375in">
        <fo:region-body/>
        <fo:region-after extent=".625in"/>
    </fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="spm">
    <fo:static-content flow-name="xsl-region-after">
        <fo:block background-color="red"
        margin="-0.375in" margin-top="0in">a<fo:leader leader-length.optimum="100%"/>b</fo:block></fo:static-content>

(The 'a' and 'b' are just to show that the block doesn't extend off the sides of the page.)

Instead of getting extent exactly right, you could use display-align="after" on the fo:region-after to put the bottom of the graphic at the bottom of a taller region.

Upvotes: 1

Related Questions