xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas <nicolas.baum...@externe.bnpparibas.com>
Subject Re: Image not available
Date Tue, 09 Sep 2008 08:11:41 GMT
Nicolas <nicolas.baumann <at> externe.bnpparibas.com> writes:

> 
> Hello,
> 
> I'm using fop 0.94.
> I want to include an image that is only available through the classpath into 
> the PDF, because the application is launched by java web start. The FO file 
> contains a relative link to the image "image.gif", which is in the 
classpath. 
> It has worked well like that for a while, but now I can't identify what 
causes 
> this message : Image not available: url('image.gif').
> 
> Thanks for help.
> 

Hello,

Adding this code solved the problem but that shouldn't be necessary and has 
never been necessary until now :

[code]

      foUserAgent.setURIResolver(new URIResolver() {
        public Source resolve(String href, String base) throws 
TransformerException {
          return new StreamSource(getClass().getClassLoader
().getResourceAsStream(href));
        }
      });

[/code]


Thanks for helping.




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


Mime
View raw message