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 Eldho George <ge...@ocwen.co.in> on 2004/10/19 06:56:11 UTC
problem with image path
Hai all
The following is my code snippet for handling <img> tag.I has some problem
with image path.
I have created a servlet to converting a web page into pdf.For this i have
used a button on my page
to invoke the servlet and gets the pdf of current web page.Here i am used
the image path as
<img src="http://localhost:8080/PDF/images/banner.gif" />.Here the image
will be displayed on the web page
and i can convert it into pdf using the following xsl.Now i have created a
pdf converter application(standalone application)
and tried with some html page.Here what my problem is the images in the
html pages are not get displayed with pdf document.Because
this html page contain image path like <img src="doc/images/img1.gif"/>.I
am used fop and xsl-fo
My question is
Can I specify a local path to the image?How can I convert local path to url
using xsl.
<!--*************html code********************-->
<html>
<head>
<head>
<body>
<img src="doc/images/img1.gif"/>
</body>
</html>
<!--********Code to handle img tag***********-->
<xsl:template match="img">
<fo:block>
<fo:external-graphic>
<xsl:attribute name="src">
<xsl:text>url('</xsl:text>
<xsl:value-of
select="@src"/>
<xsl:text>')</xsl:text>
</xsl:attribute>
</fo:external-graphic>
</fo:block>
</xsl:template>
please help me
george
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
Re: problem with image path
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Eldho George wrote:
> I has some
> problem with image path.
...
> this html page contain image path like <img
> src="doc/images/img1.gif"/>.
FAQ. See the first part of
http://xml.apache.org/fop/faq.html#graphic-not-displayed
Also check
http://xml.apache.org/fop/configuration.html#summary-key-value
especially the baseURL part.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org