Announcement

Collapse
No announcement yet.

Bild gleich gross wie fo:block

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bild gleich gross wie fo:block

    Seit Tagen versuche ich ein Bild genausogroß wie einen Block zu bringen. Im Block ist aber immer ein Rand vor und nach dem Bild. Ich habe auch schon alle paddings auf 0 gesetzt - ohne Erfolg.
    Kann mir irgendwer bei dieser Frage helfen?

    Hier mein schon sehr vereinfachter Code:
    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>
    Hier mein Ergebnis im Anhang: Problem ist der rote Rand, der soll weg.

    Vielen Dank für Eure Hilfe.

    Nachtrag: wenn man mit negativen Paddings arbeitet, dann würde der Rand verschwinden, aber das kann ja nicht die Lösung sein:
    Code:
     <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>
    Attached Files
    Zuletzt editiert von alladin; 04.09.2010, 09:08. Reason: nachtrag eingebautt

  • #2
    In diesem Forum ist XSLT Thema, für XSL-FO frage in http://entwickler-forum.de/forumdisplay.php?f=366

    Comment


    • #3
      okay, danke. nehme es hier raus und poste es dort nochmals

      Comment

      Working...
      X