Reputation: 86
I've created a table in XSLT where I use XSL-fo for some objects. In this case I would like to place the image behind the text above the green line. In the screenshot you see that the second textline is cut in half, but I want to show the textline in the right way, without moving the image downwards. I've tried z-index, block-containers, background-images, padding, but I've no solution yet.
The image is in a table-cell, as well as the text. The green line is in fact the background color of the table-cell of the image.
<fo:block break-before="auto"/>
<fo:block keep-together="auto" ><!-- GENERATE TABLE START-->
<xsl:if test="Product[count(ProductID) > 0]">
<fo:table table-layout="fixed" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt">
<fo:table-column column-width="10.0mm"/>
<fo:table-column column-width="24.5mm"/>
<fo:table-column column-width="3.0mm"/>
<fo:table-column column-width="4.0mm"/>
<fo:table-column column-width="48.5mm"/>
<fo:table-column column-width="4.0mm"/>
<fo:table-column column-width="48.5mm"/>
<fo:table-column column-width="31.0mm"/>
<fo:table-column column-width="10.0mm"/>
<fo:table-column column-width="5.8mm"/>
<!--header-->
<fo:table-header>
<fo:table-row height="5.0mm">
<!--empty cell-->
<fo:table-cell/>
<!--header 1-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="69.7pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block line-height="10.799999999999999pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="4.26791pt" end-indent="0.0pt" padding-top="2.41848pt" text-align="start" keep-together="auto" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Frutiger LT 57 Condensed" font-size="9.0pt" letter-spacing="normal" word-spacing="normal">
<xsl:text>Suitable for</xsl:text>
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="8.5pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" text-align="start" keep-together="auto" letter-spacing="normal" word-spacing="normal">
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--header 2-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="2.41848pt" text-align="start" keep-together="auto" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Frutiger LT 87 Extra Black Condensed" font-size="9.0pt" letter-spacing="normal" word-spacing="normal">
<xsl:text>Description</xsl:text></fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" text-align="start" keep-together="auto" letter-spacing="normal" word-spacing="normal">
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--header 3-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="138.0pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block line-height="10.799999999999999pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="-5.6999pt" end-indent="0.0pt" padding-top="2.41848pt" text-align="start" keep-together="auto" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Frutiger LT 57 Condensed" font-size="9.0pt" letter-spacing="normal" word-spacing="normal">
<fo:block text-align="left" white-space-collapse="false" hyphenate="false" language="en" linefeed-treatment="preserve" white-space-treatment="preserve" >
<fo:inline padding-bottom="0.0pt" start-indent="-5.6999pt" end-indent="0.0pt" padding-top="2.41848pt">
<xsl:text>Details</xsl:text>
</fo:inline>
</fo:block>
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--header 4-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="88.20354pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block line-height="10.799999999999999pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="11.4pt" end-indent="0.0pt" padding-top="2.41848pt" text-align="start" keep-together="auto" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Frutiger LT 57 Condensed" font-size="9.0pt" letter-spacing="normal" word-spacing="normal">
<xsl:text>Replaces</xsl:text>
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--header 5-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-columns-spanned="2" display-align="before" width="28.5pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="7.7pt" end-indent="0.0pt" padding-top="2.41848pt" text-align="start" keep-together="auto" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Frutiger LT 87 Extra Black Condensed" font-size="9.0pt" letter-spacing="normal" word-spacing="normal">
<xsl:text>No.</xsl:text>
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select="Product[count(ProductID) > 0]">
<!--empty cells-->
<fo:table-row height="0.0pt">
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always">
<fo:table-cell/>
<!--content concerning 'Suitable for'-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="14" display-align="before" width="69.7pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block position="relative" text-align="start" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="11.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="4.26791pt" end-indent="0.0pt" padding-top="7.1pt" display-align="before">
<!--some code-->
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell/>
<!--language blocks-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="2" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="2.84527pt" display-align="before">
<!--some code-->
</fo:block>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell/>
<!--concent concerning 'Details'-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="138.0pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block line-height="10.799999999999999pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.78245pt" start-indent="-5.6999pt" end-indent="0.0pt" padding-top="6.5pt" text-align="start" background-color="transparent" keep-together="auto" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Frutiger 57 Condensed" font-size="9.0pt" letter-spacing="normal" word-spacing="normal">
<xsl:value-of disable-output-escaping="no" select="Matchcode"/>
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
<!--content concerning 'Replaces'-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="88.20354pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="11.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="ignore-if-after-linefeed" hyphenate="true" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="6.5pt" display-align="before">
<xsl:call-template name="tmpManufacturer_ref"></xsl:call-template>
</fo:block>
</fo:table-cell>
<!--content concerning 'No.'-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-columns-spanned="2" display-align="before" width="28.5pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="5.69055pt" text-align="end" background-color="transparent" keep-together="auto" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Frutiger LT 87 Extra Black Condensed" font-size="11.0pt" letter-spacing="normal" word-spacing="normal">
<xsl:value-of disable-output-escaping="no" select="ProductID"/>
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<!--product images-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="13" number-columns-spanned="2" display-align="center" width="138.0pt" reference-orientation="0">
<xsl:choose>
<xsl:when test="contains(Documents/Document/DocumentAssets/DocumentAsset/DocumentURL,'_LL') and Documents/Document/DocumentAssets/DocumentAsset/UsageTypeID = 'normal'">
<fo:block position="relative" text-align="center" padding-top="2.0mm" padding-bottom="-2.0mm" display-align="center" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt">
<xsl:call-template name="tmpBildLL" />
</fo:block>
</xsl:when>
<xsl:when test="contains(Documents/Document/DocumentAssets/DocumentAsset/DocumentURL,'_L') and Documents/Document/DocumentAssets/DocumentAsset/UsageTypeID = 'normal'">
<fo:block position="relative" text-align="center" display-align="center" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt">
<xsl:call-template name="tmpBildL" />
</fo:block>
</xsl:when>
<xsl:when test="contains(Documents/Document/DocumentAssets/DocumentAsset/DocumentURL,'_M') and Documents/Document/DocumentAssets/DocumentAsset/UsageTypeID = 'normal'">
<fo:block position="relative" text-align="center" display-align="center" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt">
<xsl:call-template name="tmpBildM" />
</fo:block>
</xsl:when>
<xsl:when test="contains(Documents/Document/DocumentAssets/DocumentAsset/DocumentURL,'_KK') and Documents/Document/DocumentAssets/DocumentAsset/UsageTypeID = 'normal'">
<fo:block position="relative" text-align="center" display-align="center" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt">
<xsl:call-template name="tmpBildKK" />
</fo:block>
</xsl:when>
<xsl:when test="contains(Documents/Document/DocumentAssets/DocumentAsset/DocumentURL,'_K') and Documents/Document/DocumentAssets/DocumentAsset/UsageTypeID = 'normal'">
<fo:block position="relative" text-align="center" display-align="center" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt">
<xsl:call-template name="tmpBildK" />
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block position="relative" text-align="center" display-align="center" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt">
<xsl:call-template name="tmpBildUnisize" />
</fo:block>
</xsl:otherwise>
</xsl:choose>
</fo:table-cell>
<!--image QR code-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="11" number-columns-spanned="2" display-align="before" width="28.5pt" reference-orientation="0">
<fo:block position="relative" text-align="end" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="ignore-if-surrounding-linefeed" hyphenate="true" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="2.8pt" display-align="before">
<xsl:choose>
<xsl:when test="string-length(QR_CODE) > 0">
<xsl:call-template name="tmpQRCode" />
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="0.71131pt" keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous.within-line="always" keep-with-previous.within-column="always" keep-with-previous.within-page="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<!--language blocks-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<!--some code>
</fo:block>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell/>
</fo:table-row>
<fo:table-row height="0.71131pt" keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous.within-line="always" keep-with-previous.within-column="always" keep-with-previous.within-page="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<!--language blocks-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="2" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<!--some code>
</fo:block>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell/>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
</fo:table-row>
<fo:table-row height="0.71131pt" keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous.within-line="always" keep-with-previous.within-column="always" keep-with-previous.within-page="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<!--lanuguage blocks-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="2" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<!--some code>
</fo:block>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell/>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
</fo:table-row>
<fo:table-row height="0.7113pt" keep-with-next="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<!--language blocks-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="2" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<!--some code-->
</fo:block>
</fo:table-cell>
<!--empty cell-->
<fo:table-cell/>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
</fo:table-row>
<fo:table-row height="0.71131pt" keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next="always" keep-with-previous="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<!--language blocks-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<!--some code-->
</fo:block>
</fo:table-cell>
<fo:table-cell/>
</fo:table-row>
<fo:table-row height="0.71131pt" keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next.within-line="always" keep-with-next.within-column="always" keep-with-next.within-page="always" keep-with-previous.within-line="always" keep-with-previous.within-column="always" keep-with-previous.within-page="always">
<!--empty cell-->
<fo:table-cell/>
<!--code for generating page number-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-rows-spanned="2" display-align="before" width="8.5pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<fo:block id="{generate-id(.)}"/>
</fo:block>
</fo:table-cell>
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
<fo:table-cell/>
</fo:table-row>
<fo:table-row keep-together.within-line="always" keep-together.within-column="always" keep-together.within-page="always" keep-with-next.within-line="always" keep-with-next.within-column="always" keep-with-next.within-page="always">
<!--empty cell-->
<fo:table-cell/>
<!--language blocks-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-columns-spanned="2" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<!--some code-->
</fo:block>
</fo:table-cell>
<!--code for generating page numbers-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="11.4pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="12.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<xsl:call-template name="tmpOEM" />
<xsl:call-template name="tmpOEM_other" />
</fo:block>
</fo:table-cell>
<!--Special product-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="28.5pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="11.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="ignore-if-surrounding-linefeed" hyphenate="true" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="2.8453pt" display-align="before">
<!--some code-->
</fo:block>
</fo:table-cell>
<!--New Product-->
<fo:table-cell padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before" width="16.5pt" reference-orientation="0">
<fo:block position="relative" text-align="start" color="rgb-icc(0,0,0, #CMYK, 0.65,0.53,0.51,1.0)" font-family="Arial" font-size="11.0pt" white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="true" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" display-align="before">
<xsl:if test="NewInCat='Y'">
<xsl:call-template name="TemplateNEW"></xsl:call-template>
</xsl:if>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row keep-with-previous="always">
<!--empty cells-->
<fo:table-cell/>
<fo:table-cell border-bottom-style="solid" border-bottom-width="0.30001pt" border-bottom-color="rgb-icc(1,1,1, #CMYK, 0.0,0.0,0.0,1.0)" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="0.0pt" padding="0.0pt" number-columns-spanned="9" display-align="before" width="69.7pt" reference-orientation="0">
<fo:block break-before="auto"/>
<fo:block white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve" hyphenate="false" language="en" padding-bottom="0.0pt" start-indent="0.0pt" end-indent="0.0pt" padding-top="5.7pt" text-align="start" keep-together="auto" letter-spacing="normal" word-spacing="normal">
</fo:block>
<fo:block break-after="auto"/>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:if>
</fo:block>
<fo:block break-after="auto"/>
Upvotes: 1
Views: 1664
Reputation: 8877
Using background-image on the table-cell or on a block-container inside the table cell works for me. This code:
<fo:table>
<fo:table-column column-width="4.7in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell background-image="test.jpg" height="2.3in" border-top="1pt solid black">
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border-top="1pt solid black" >
<fo:block-container background-image="test.jpg" height="2.3in">
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
<fo:block text-align="right">I am some text in the table cell. </fo:block>
</fo:block-container>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
Results in this image below. You can see that the text overlaps the image as I made it do so intentionally. You could of course control the image through no-repeat. The only limitation would be sizing the image (if it needed to be controlled) unless you use a renderer that supports background-image scaling. RenderX supports this, I am not sure Apache FOP does.
Upvotes: 2