DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11838>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11838 Error when use a user configuartion font file in embedded FOP Summary: Error when use a user configuartion font file in embedded FOP Product: Fop Version: 0.20.4 Platform: PC OS/Version: Other Status: NEW Severity: Critical Priority: Other Component: general AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I added font "Arial Narrow" to FOP on Windows 2000 server. I followed the instructions in FOP web site to generate font metrics xml file and register it within FOP. The code in userconfig.xml is: <!-- Arial Narrow --> <font metrics-file="file:///c:/fop/fop-0.20.4/fonts/arialn.xml" kerning="yes" embed-file="c:\winnt\fonts\arialn.ttf"> <font-triplet name="Arial Narrow" style="normal" weight="normal"/> <font-triplet name="ArialMTN" style="normal" weight="normal"/> </font> <font metrics-file="file:///c:/fop/fop-0.20.4/fonts/arialnb1.xml" kerning="yes" embed-file="c:\winnt\fonts\arialnb.ttf"> <font-triplet name="Arial Narrow" style="normal" weight="bold"/> <font-triplet name="ArialMTN" style="normal" weight="bold"/> </font> <font metrics-file="file:///c:/fop/fop-0.20.4/fonts/arialni.xml" kerning="yes" embed-file="c:\winnt\fonts\arialni.ttf"> <font-triplet name="Arial Narrow" style="italic" weight="normal"/> <font-triplet name="ArialMTN" style="italic" weight="normal"/> </font> <font metrics-file="file:///c:/fop/fop-0.20.4/fonts/arialnbi.xml" kerning="yes" embed-file="c:\winnt\fonts\arialnbi.ttf"> <font-triplet name="Arial Narrow" style="italic" weight="bold"/> <font-triplet name="ArialMTN" style="italic" weight="bold"/> </font> When I used the following command line to excute: C:\fop\fop-0.20.4>fop -c conf/userconfig1.xml -xsl test.xsl -xml test.xml -pdf test.pdf It works fine. However if I use FOP embedded mode with code: Driver driver = new Driver(); String userConfig = "c:/fop/fop-0.20.4/conf/userconfig.xml"; File userConfigFile = new File(userConfig); Options options = new Options(); options.loadUserconfiguration(userConfigFile); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render(input.getParser(), input.getInputSource()); I get the following errors: [ERROR] Failed to read font metrics file /c:/fop/fop- 0.20.4/fonts/arialnb1.xml : File "/c:/fop/fop-0.20.4/fonts/arialnb1.xml" not found. org.apache.fop.apps.FOPException: java.lang.NullPointerException at org.apache.fop.apps.Driver.render(Unknown Source) at com.ceira.apriaups.UPSManifest.FopPrintUPS.FilerenderXML (FopPrintUPS.java:82) at com.ceira.apriaups.UPSManifest.FopPrintUPS.ManifestReporter (FopPrintUPS.java:58) at com.ceira.apriaups.UPSManifest.FopPrintUPS.main(FopPrintUPS.java:226) --------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]