W3C home > Mailing lists > Public > www-xsl-fo@w3.org > January 2003

RE: Problem in getting image in PDF using xsl-fo

From: Guo, Gordon <gguo@cdocs.com>
Date: Mon, 13 Jan 2003 16:18:43 -0500 (EST)
Message-ID: <947CE2C569B03345B9D3F713BC3AE6540992D6@postal.cds-master.cdocs.com>
To: "Jasmin Mehta" <jmehta@mdnotes.com>, <www-xsl-fo@w3.org>
Cc: <gkholman@CraneSoftwrights.com>
For the following code, you have to creat a element of "src".
<xsl:attributename="src">
   <xsl:value-of select="absolutePathGotFromPropertyFile"/>
</xsl:attribute>
-----Original Message-----
From: Jasmin Mehta [mailto:jmehta@mdnotes.com]
Sent: Monday, January 13, 2003 10:01 AM
To: Guo, Gordon; www-xsl-fo@w3.org
Cc: gkholman@CraneSoftwrights.com
Subject: RE: Problem in getting image in PDF using xsl-fo


Hi,
 
I also have tried by giving the absolute path for the url. By giving,
 
<fo:block text-align="center" line-height="40pt" start-indent = "10.0cm">
           <fo:external-graphic height="auto" width="auto" content-height="auto"
                    content-width="auto" src="url('http://localhost:8100/LDNotes/doctor/signature.gif')">
          </fo:external-graphic>
</fo:block>  
 
But, Still I'm getting the same error as:
 
[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)
 
Please help, I am not able to resolve this since long,
 
Thanks for your help.
Jasmin
 
 
-----Original Message-----
From: Guo, Gordon [mailto:gguo@cdocs.com] 
Sent: Monday, January 13, 2003 10:53 AM
To: Jasmin Mehta; www-xsl-fo@w3.org
Cc: gkholman@CraneSoftwrights.com
Subject: RE: Problem in getting image in PDF using xsl-fo
 
Hi,
    Saftest way is to use absolute path than relative path.   When the apllication is colmplicate, you are not always sure which process and at what level system to inlvoke the FOP, so you never sure what is your current dirctory. 
    Wish this could give you some clue.
Gordon
 
      
-----Original Message-----
From: Jasmin Mehta [mailto:jmehta@mdnotes.com]
Sent: Monday, January 13, 2003 9:43 AM
To: www-xsl-fo@w3.org
Cc: gkholman@CraneSoftwrights.com; Guo, Gordon
Subject: Problem in getting image in PDF using xsl-fo
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=http://localhost:8100/LDNotes/doctor/ShowAllFinalDocs.jsp 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.
 
Than, I have tried using url('') like below:
 
<fo:block text-align="center" line-height="40pt" start-indent = "10.0cm">
           <fo:external-graphic height="auto" width="auto" content-height="auto"
                    content-width="auto" src="url('signature.gif')">
          </fo:external-graphic>
</fo:block>  
 
But stil I am not able to view it and getting the error as below:
 
[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/LDNotes/doctor/signature.gif)
 
Can somebody suggest me what path can I use here?
 
Thanks
 
Jasmin
 
 
Received on Thursday, 16 January 2003 08:35:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:10 GMT