You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Léa Massiot <lm...@orange.fr> on 2012/05/29 14:34:08 UTC
"fo:external-graphic" inside a "fo:block" - Unexpected margins
Hello and thank you for reading my post.
When I put a "fo:external-graphic" inside a "fo:block" (cf. the XSL-FO
stylesheet below and the resulting PDF document attached), I get:
- an extra (red) margin above the image,
- an extra (red) margin below the image (bigger than the previous),
- no extra left or right margins.
What are these margins?
Can they be removed?
Nota:
In the PDF file attached, the image is a GIF image.
The background of the "fo:external-graphic" element is green (rgb(0,255,0)).
The background of the "fo:block" element is red (rgb(255,0,0)).
Thank you and best regards.
XSF-FO stylesheet
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="quotation">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name = "A4-portrait"
page-height="{@page_height}"
page-width="{@page_width}"
margin="{@margin}"
>
<fo:region-body background-color="orange" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4-portrait">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="area" />
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="area">
<fo:block background-color="rgb(255, 0, 0)">
<fo:external-graphic content-height="120%"
scaling="uniform"
background-color="rgb(0, 255, 0)"
src="url(images/try_36px_36px.gif)" />
<fo:external-graphic content-height="120%"
scaling="uniform"
background-color="rgb(0, 255, 0)"
src="url(images/try_36px_36px.gif)" />
</fo:block>
</xsl:template>
</xsl:stylesheet>
http://old.nabble.com/file/p33924810/test_fo_external_graphic.pdf
test_fo_external_graphic.pdf
--
View this message in context: http://old.nabble.com/%22fo%3Aexternal-graphic%22-inside-a-%22fo%3Ablock%22---Unexpected-margins-tp33924810p33924810.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org