xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-François El Fouly <jean-franc...@elfouly.fr>
Subject Re: Image not available
Date Tue, 09 Sep 2008 08:32:22 GMT
Well, As Far As I Understand It...
This *is *required and even so, it works by some kind of side-effect or 
implementation tolerance.
If I refer to the XSL FO official documentation at http://www.w3.org/TR/xsl/
what you write in url(...) is an IRI in the sense of RFC3987, and 
"relative" resource names are just not allowed there.
We had this very same problem (well, even a bit harder because the image 
files where in an "images" subdirectory) and we came to the conclusion 
that to be on the safe side, you need to build "full" URL's or fully 
qualified path names if you use the "file:" access method.
Relative URL's or relative path just wouldn't work.

Nicolas a écrit :
> 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

View raw message