On 2013-10-25 Luis Bernardo wrote:
> On 10/24/13 5:52 PM, honyk wrote:
> >
> > I am just curious if this is a bug or feature...
> >
> > When this FO code is used, the title page image is shifted do the
> left (the
> > left edge is outside the page). It happens when both the page master
> margin
> > (20mm) and the image's block text-align (center) properties are set.
> >
> > If any of them is removed, the image is displayed as expected (not
> left
> > cropped).
> >
> > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> >
> >    <fo:layout-master-set>
> >        <fo:simple-page-master master-name="titlepage" page-
> width="210mm"
> > page-height="297mm" margin="20mm">
> >           <fo:region-body/>
> >        </fo:simple-page-master>
> >    </fo:layout-master-set>
> >
> >    <fo:page-sequence master-reference="titlepage">
> >        <fo:flow flow-name="xsl-region-body">
> >           <fo:block-container absolute-position="fixed" left="0mm"
> top="0mm"
> > width="100%" height="100%">
> >              <fo:block text-align="center">
> >                 <fo:external-graphic content-width="210mm"
> > src="Images/TitlePageImage.jpg"/>
> >              </fo:block>
> >           </fo:block-container>
> >        </fo:flow>
> >    </fo:page-sequence>
> > </fo:root>
> >
> 
> What is the purpose of the absolute-position="fixed" left="0mm"
> top="0mm"?
> 

My title page is designed to fit exactly the ISO A4 page (as a background).
So I am placing it to the left top corner and then scale it using the
content-width="210mm". That text-align property has been introduced when I
tested narrower (and hence centered) images. 

> If you use trunk or 1.0 text-align="left|center|right" works as
> expected.

Wow, thanks for the info.

Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to