Re: [xsl] XSL FO Image alignment problem

Subject: Re: [xsl] XSL FO Image alignment problem
From: "Jay Bryant" <jay@xxxxxxxxxxxx>
Date: Fri, 1 Feb 2008 11:27:39 -0600
I am working on XSL FO to convert XML to PDF. Can
anyone suggest, How to set the images always at top or
bottom of the pages?

I am using Apache-fop-0.94.

My XSL is like:
<xsl:template match="fig/graphic">
<fo:block text-align="center">
<fo:external-graphic src="{@src}"
baseline-shift="-2mm">
<xsl:apply-templates/>
</fo:external-graphic>
</fo:block>
</xsl:template>

Investigate the display-align property: http://www.w3.org/TR/xsl/#display-align


Then replace

<fo:block text-align="center">

with

<fo:block break-before="page" text-align="center" display-align="before">

Jay Bryant
Bryant Communication Services
http://www.bryantcs.com/


Current Thread