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 Antti Karanta <an...@napa.fi> on 2008/12/03 08:03:31 UTC

fo:external-graphic w/ # in file name



                      Hi!

   I noticed that if I have # in the file name of an external graphics  
file, fop is unable to find it. If I rename the file (and change the .fo  
file accordingly) it works.

   Here's what I have:


                <fo:external-graphic  
src="url(file:/C:/Temp/test123/m2#1_1.svg)" width="auto" height="auto"
                                     content-width="auto"
                                     content-height="auto"
                                     content-type="content-type:image/svg+xml"
                                     text-align="center"/>

   Here's the error message:

3.12.2008 8:46:20 org.apache.fop.fo.flow.ExternalGraphic bind
SEVERE: Image not found: file:/C:/Temp/test123/m2#1_1.svg


   The file does exist:

C:\Temp\test123>dir m2#1_1.svg
  Volume in drive C is Local Disk
  Volume Serial Number is F8AC-6817

  Directory of C:\Temp\test123

28.11.2008  13:29            98 080 m2#1_1.svg
                1 File(s)         98 080 bytes
                0 Dir(s)  63 134 236 672 bytes free



   Environment:

   fop 0.95
   windows xp sp2
   java 1.5.0_15




         ::Antti::


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: fo:external-graphic w/ # in file name

Posted by Antti Karanta <an...@napa.fi>.
On Wed, 03 Dec 2008 09:23:25 +0200, Jeremias Maerki <de...@xxxx> wrote:

> "#" in a URI has a special meaning. It's used as separator for the URI
> fragment. You have to escape that character using %23 (if I've looked
> that up correctly).
>
> url(file:/C:/Temp/test123/m2%231_1.svg)

   Thanks! That works perfect.



       ::Antti::


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: fo:external-graphic w/ # in file name

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
"#" in a URI has a special meaning. It's used as separator for the URI
fragment. You have to escape that character using %23 (if I've looked
that up correctly).

url(file:/C:/Temp/test123/m2%231_1.svg)

On 03.12.2008 08:03:31 Antti Karanta wrote:
> 
> 
> 
>                       Hi!
> 
>    I noticed that if I have # in the file name of an external graphics  
> file, fop is unable to find it. If I rename the file (and change the .fo  
> file accordingly) it works.
> 
>    Here's what I have:
> 
> 
>                 <fo:external-graphic  
> src="url(file:/C:/Temp/test123/m2#1_1.svg)" width="auto" height="auto"
>                                      content-width="auto"
>                                      content-height="auto"
>                                      content-type="content-type:image/svg+xml"
>                                      text-align="center"/>
> 
>    Here's the error message:
> 
> 3.12.2008 8:46:20 org.apache.fop.fo.flow.ExternalGraphic bind
> SEVERE: Image not found: file:/C:/Temp/test123/m2#1_1.svg
> 
> 
>    The file does exist:
> 
> C:\Temp\test123>dir m2#1_1.svg
>   Volume in drive C is Local Disk
>   Volume Serial Number is F8AC-6817
> 
>   Directory of C:\Temp\test123
> 
> 28.11.2008  13:29            98 080 m2#1_1.svg
>                 1 File(s)         98 080 bytes
>                 0 Dir(s)  63 134 236 672 bytes free
> 
> 
> 
>    Environment:
> 
>    fop 0.95
>    windows xp sp2
>    java 1.5.0_15
> 
> 
> 
> 
>          ::Antti::
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org