Dynamic URL for background-image
Posted: Wed Nov 14, 2007 11:51 am
Hi,
When I use the following code, the image gets displayed correctly in the PDF-
but when I assgn the path to a variable like the following-
and then use-
I dont get the image on the PDF. Am I missing something??
Thnxxx.
Sanjeev.
When I use the following code, the image gets displayed correctly in the PDF-
Code: Select all
<fo:block border-style="solid" border-width="0.2pt"
text-align="left" font-size="8pt"
font-weight="bold" color="white" padding-top="1pt"
padding-bottom="1pt"
background-image="url{'http://localhost:8080/project/images/table_header_center.png'}">
<xsl:value-of select="tr/td/span" />
</fo:block>
Code: Select all
<xsl:variable name="imgPath"
select=" 'http://localhost:8080/project/images/table_header_center.png' " />
Code: Select all
<fo:block border-style="solid" border-width="0.2pt"
text-align="left" font-size="8pt"
font-weight="bold" color="white" padding-top="1pt"
padding-bottom="1pt"
background-image="url{$imgPath}">
<xsl:value-of select="tr/td/span" />
</fo:block>
Thnxxx.
Sanjeev.