Jump to content

Graphic same size like fo:block


Guest Alladin

Recommended Posts

Guest Alladin

For days I try to size a graphic the same size like a fo:block. But the block always has a (undefined) padding at the top and at the bottom. I also putted all block-paddings to 0, but no effect :-(Can anybody help me whats wrong?Here is my already very easy code:

<?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" xmlns:fox="http://xml.apache.org/fop/extensions">    <xsl:template match="/">    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">	    <fo:layout-master-set>		<fo:simple-page-master master-name="first" page-width="12mm" page-height="12mm" >		    <fo:region-body region-name="xsl-region-body" ></fo:region-body>   		</fo:simple-page-master>	    </fo:layout-master-set>		    <fo:page-sequence master-reference="first">		<fo:flow flow-name="xsl-region-body">		  <fo:block-container position="absolute" top="1mm" left="1mm" width="10mm" height="10mm">		    <fo:block background-color="red">			<fo:external-graphic content-width="10mm" content-height="10mm">			    <xsl:attribute name="src">igel.jpg</xsl:attribute>			</fo:external-graphic>		     </fo:block>		  </fo:block-container>		</fo:flow>	    </fo:page-sequence>    </fo:root>    </xsl:template></xsl:stylesheet>

Here is the generated pdf (as Screenshot), Problem is the red area.blockProblem.jpgI also tried working with negative padding, it worked but is this really a good solution - I don't think so.

 <fo:block background-color="red" padding-top="-1mm" padding-bottom="-2mm">      <fo:external-graphic content-width="10mm" content-height="10mm">      <xsl:attribute name="src">igel.jpg</xsl:attribute></fo:external-graphic>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...