I'm using FOP in a home-written tomcat servlet.
The core of my java code looks like this:

InputStream in = 
getClass().getResourceAsStream("/component/resources/fopconfig.xml");
try {
        Options options = new Options(in);
                        
} catch (Exception e1) {
        ...
}
Driver driver = new Driver(new InputSource(new StringReader(myXmlString)), 
response.getOutputStream());
...
driver.setRenderer(Driver.RENDER_PDF);
                
try {
        driver.run();
} catch (Exception e) {
        ...
}

I have a custom fopconfig.xml, because I need to use local fonts. This 
configuration is placed in the ..myApp\WEB-INF\classes\component\resources 
directory. In the same directory there is myFont.xml - xml metrics of my 
font.
The only change to the configuration is this:
<font 
metrics-file="file:///projekty/projekt/WEB-INF/classes/component/resources/timescs.xml"
 
                kerning="yes" embed-file="C:\WINNT\Fonts\times.ttf">
         <font-triplet name="TimesCS" style="normal" weight="normal" />
         <font-triplet name="TimesCS" style="normal" weight="bold" />
 </font>

This configuration works ok. But it seems impossible to change 
filesystem paths to relative ones - the font metrics aren't found.

I use 1.4.2_04-b05, Apache Tomcat/5.0.24, Windows 2000 x86, and FOP 
0.20.5. I have found the same problem in the history of this conference 
several years ago - it was said to be bug of FOP. Is this still bug in FOP 
or do I do something wrong? 
 -- 
   S pozdravem
       Ondrej Nekola
       [EMAIL PROTECTED]
       http://www.matfyz.cz/ondra
       ICQ# 160692888

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

Reply via email to