Hi,

 

In context of my below email, I have also tried with setting base dir from the servlet by writing below line in servlet:

 

      org.apache.fop.configuration.Configuration.put("baseDir","http://localhost:8100/LDNotes/doctor/");

 

and change my xsl-fo code like below: (just specifying image file name in source attribute as a relative path)

 

<fo:block text-align="center" start-indent = "10.0cm">

            <fo:external-graphic>

                 <xsl:attribute name="src"><xsl:value-of select="Dictator_Signature"/></xsl:attribute>

</fo:external-graphic>

              </fo:block>

But still I’m getting below error:

 

[ERROR] Could not load external SVG: The current document is unable to create an

 element of the requested type (namespace: http://www.w3.org/2000/svg, name: hea

d).

[ERROR] Error while creating area : No ImageReader for this type of image (http:

//localhost:8100/MDNotes/doctor/signature.gif)

 

Now, if I change my xsl-fo file again as below (give full path where the file is located in local system)

 

<xsl:attribute name="src">C:\\JRun4\\servers\\default\\MDNotes\\phySignatures\\<xsl:value-of select="Dictator_Signature"/></xsl:attribute>

 

than it works fine.

 

Can anybody pl focus on who to solve this problem

 

Thanks

Jasmin

 

 

 

-----Original Message-----
From: Jasmin Mehta
Sent:
Thursday, January 09, 2003 12:27 PM
To: '[EMAIL PROTECTED]'
Subject: problem in FOP for locating image with relative path

 

Hi,

 

I want to add image in the PDF file. I’m using below tag in my xsl-fo file

 

<fo:block text-align="center" start-indent = "10.0cm">

 

            <fo:external-graphic>

 

                 <xsl:attribute name="src">C:/JRun4/servers/default/LDNotes/doctor/<xsl:value-of select="Dictator_Signature"/></xsl:attribute>

 

    

 

                </fo:external-graphic>

 

              </fo:block>

 

 

 

and it works fine. But a I want to use this xsl-fo file in my JSP, I want to give a relative path for this image source. For example the JSP that has link to open this PDF file using xsl-fo has url="" and my all images to display are located in /LDNotes/doctor/ folder at default server directory of JRun.

 

 

Now, if I write the tag like below:

 

 

<xsl:attribute name="src">./../doctor/<xsl:value-of select="Dictator_Signature"/></xsl:attribute>

 

 

 

I’m getting below error and image is not displaying.

 

 

 

[ERROR] Error while creating area : Error with image URL: .\..\doctor\signature.gif (The system cannot find the path specified) and no base directory is specified.

 

Can somebody suggest me what path can I use here?

 

I also don’t know how to set the base directory. My server url can be http://localhost:8100/LDNotes/doctor while I will access the .xsl file from the servlet.

 

Thanks

 

Jasmin

 

 

Reply via email to