Sorry for the delay. I seemed to have missed this.

My suspicion is that the "No ImagePreloader found" is only a follow-up
error of an error thrown when parsing the SVG. Are there no other error
messages before the above error in the log? Lea, would you send me your
SVG font file you referenced in your testfile below so I don't have to
spend too much time trying to set up the same testcase? I'm not too
familiar with SVG fonts. I will then try to reproduce the problem ASAP
so I can provide better feedback. Otherwise, please try to set this up
for debugging and try to figure out by
org.apache.fop.image.loader.batik.PreloaderSVG fails to recognize your
SVG as a valid SVG file.

On 02.06.2008 18:04:40 Lea Thurman wrote:
> 
> Hi,
> 
> I am using batik 1.7 to render an SVG document. I then create a FOP document
> and reference the generated SVG which is then converted into PDF using FOP
> 0.95beta.  The FOP document is below (but I suspect not the issue):
> 
> <?xml version="1.0" encoding="utf-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";
> xmlns:fox="http://xmlgraphics.apache.org/fop/extensions";>
>       <fo:layout-master-set>
>         <fo:simple-page-master master-name="A4-portrait"
> page-height="29.7cm" page-width="21.0cm" margin="2cm">
>           <fo:region-body/>
>         </fo:simple-page-master>
>       </fo:layout-master-set>
>       <fox:external-document id="img1" src="/Users/temp/project/page1.svg"/>
> </fo:root>
> 
> Everything has been working well until I attempted to reference an external
> font in the SVG file.
> 
> I get a 'No ImagePreloader found" error when I reference the SVG document
> below. The error seems to be as a result of the following SVG element which
> is referencing an external font file. I know the external font file is good
> since this can be converted successfully into PDF using the testcard
> characters. The SVG file is below:
> 
> <?xml version="1.0" standalone="yes"?>
> <svg width="400px" height="300px" version="1.1"
> xmlns='http://www.w3.org/2000/svg'>  
>  <defs>
>  <font-face font-family="Swiss721NarrowSWA">
>    <font-face-src>
>      <font-face-uri
> xlink:href="file:///Users/temp/project/myfont.svg#Font1"/>
>    </font-face-src>     
>  </font-face>
>  </defs>
> <g style="font-family: Swiss721NarrowSWA; font-size:18;fill:black"> 
>   <text x="20" y="120">@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_</text> 
> </g>
> </svg>
> 
> Everything works as expected if I embed the font into the SVG document
> rather than referencing it.
> 
> I am not sure if it is something I have done with Batik or it is a FOP error
> so I decided to post here first. Apologies if this is clearly a FOP problem
> however FOP is able to handle to conversion with an embedded font so maybe I
> have referenced the font incorrectly in SVG.
> 
> Any help would be much appreciated.
> 
> Regards
> Lea.
> -- 
> View this message in context: 
> http://www.nabble.com/%22No-ImagePreloader-found%22-when-attempting-to-reference-external-font-tp17604859p17604859.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to