Hi all, > FOP 0.91 currently can't deal with relative URLs for embedding. Neat > comment in the relevant code: > /[EMAIL PROTECTED] Temporary hack to compile, improve later */ > return new java.net.URL(uri).openStream(); > Don't expect a quick fix,Getting the necessary information for > resolving relative URLs at this point will need some work. > > [snip] >> I tried to use "file://../", "file://.././", etc., but no one works. > > Neither of these two is an relative URL, as you might have thought.
I haven't tried 0.91 yet, but in 0.20.5 the above URLs did work as relative (although indeed they shouldn't). Worse: if you left out the //, they didn't work anymore. I have fontBaseDirs for several languages that look like this (relative to baseDir): ../../../config/ru But if I put it like that in userconfig.xml, FOP complains about the missing protocol. This shouldn't be an issue, but OK, I change it to: file:../../../config/ru Now the resolver seems to eat the first four dots (waiting until it encounters two slashes?) and looks in ../config/ru, which doesn't exist. To make FOP find the dir, I can specify this: file:../../../../config/ru (notice the *extra* ../) or even this: file:./../../../config/ru or this: file://../../../config/ru There's also something wrong at the other end: if the location isn't found, the "/ru" part will be left out of the "not found" message. If I put a slash at the end, this doesn't happen. So, to wrap it all up, in order to have FOP look for my metrics files in ../../../config/ru *and* give me the right error message if it doesn't find them, I have to specify the fontBaseDir as: file://../../../config/ru/ BTW, there seems to be a similar (though not exactly equal) problem in Ant. All that said, let me also make clear that I love FOP and that I HUGELY appreciate the efforts of all you people who brought it to us and are working hard to improve it. Without Apache FOP, the Firebird open source project would have no PDF documentation, or at least we would be dependent on individuals who had the money to buy a proprietary FO processor and the time and kindness to build our docs. Now every project member can build great-looking PDFs, using only open-source tools. Thanks! Greetings, Paul Vinkenoog --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
