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

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

From: Jasmin Mehta <jmehta@mdnotes.com>
Date: Thu, 16 Jan 2003 12:52:05 -0500
Message-ID: <6ED02078F47515408A210DC2124C84D7735E@MDN-MAIN.mdnotes.com>
To: <www-xsl-fo@w3.org>



-----Original Message-----

I did try that too, by writing tag as 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">
           <xsl:attribute name="src">url('<xsl:value-of
select="Dictator_Signature"/>')
           </xsl:attribute>
             </fo:external-graphic>
   </fo:block>
 
But still the same 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/LDNotes/doctor/signature.gif)
 
Jasmin
-----Original Message-----
From: Guo, Gordon [mailto:gguo@cdocs.com] 
Sent: Monday, January 13, 2003 11:06 AM
To: Jasmin Mehta; www-xsl-fo@w3.org
Cc: gkholman@CraneSoftwrights.com
Subject: RE: Problem in getting image in PDF using xsl-fo
 
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
		 
		 

-- 
  Henry S. Thompson, HCRC Language Technology Group, University of
Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is
forged spam]
Received on Thursday, 16 January 2003 12:50:01 GMT

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