[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] FOP 0.93: Cannot load fonts/NullPointerException
Perhaps it's something to do with a conflict between FOP and JRE 1.5. After using absolute references to the fonts, I no longer get the error. However, I get the following NullPointerException: SEVERE: Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) at org.apache.fop.cli.Main.startFOP(Main.java:160) at org.apache.fop.cli.Main.main(Main.java:191) I've attached the config file I'm using and the resulting FO file I'm trying to convert to PDF. Regards, Jeff Powanda Vocera Communications Senior Technical Writer 408-790-4256 -----Original Message----- From: Vincent Hennebert [mailto:vincent.hennebert@anyware-tech.com] Sent: Monday, March 12, 2007 1:23 AM To: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] FOP 0.93: Cannot load fonts/NullPointerException [Re-sending to the list...] Jeff Powanda a écrit : > Yes, I've tried using absolute URLs for both the <font-base> element and > the metrics-url attribute on the <font> element. Both still result in > the null pointer exception when I run FOP. Relative URLs should work, both for <base> and <font-base>. Are you sure of your metrics filename? Do you also have the problem for other metrics files? Can you post your config file and, if possible, the FO file resulting from the XSLT transformation (or a stripped-down version showing the problem)? Thanks, Vincent > -----Original Message----- > From: Mauritz Jeanson [mailto:mj@johanneberg.com] > Sent: Saturday, March 10, 2007 2:42 AM > To: Jeff Powanda; docbook-apps@lists.oasis-open.org > Subject: RE: [docbook-apps] FOP 0.93: Cannot load > fonts/NullPointerException > >> -----Original Message----- >> From: Jeff Powanda >> >> I'm using the DocBook 1.72 XSL stylesheets with FOP 0.93. I >> followed the Apache FOP instructions for regenerating font >> metrics files, and I updated the FOP configuration file to >> the new format. When I run FOP, I get the following exception. >> >> SEVERE: Exception >> >> java.lang.RuntimeException: Cannot load font: failed to >> create Source from metrics file SY______.xml >> >> It didn't seem to be loading any of the fonts. The >> <font-base> in the configuration file was correct, so I don't >> know why it couldn't load the files. I decided to update the >> configuration file to use relative URLs based on the <base>. >> When I ran FOP again, I got a NullPointerException: > > > Have you tried to use absolute URIs for either the <font-base> element > or > the metrics-url attribute on the <font> elements? These methods work for > me. > > For example, > > <font-base>file:///c:/Java/fop-0.93/conf/</font-base> > > or > > <font metrics-url="file:///C:/Java/fop-0.93/conf/gara.xml" > kerning="yes" > embed-url="file:///C:/WINDOWS/Fonts/GARA.TTF"> > <font-triplet name="Garamond" style="normal" weight="normal"/> > </font> > > /MJ > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
<?xml version="1.0"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- $Id: fop.xconf 447325 2006-09-18 10:55:33 +0200 (Mon, 18 Sep 2006) jeremias $ --> <!-- This is an example configuration file for FOP. This file contains the same settings as the default values and will have no effect if used unchanged. Relative config url's will be resolved relative to the location of this file. --> <!-- NOTE: This is the version of the configuration --> <fop version="1.0"> <!-- Base URL for resolving relative URLs --> <base>file:///C:/docs/Main/xml/%product_id%/%doc_id%/</base> <!-- Font Base URL for resolving relative font URLs --> <font-base>file:///C:/Docs/Main/xml/shared/tools/vocera/fonts093/</font-base> <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi --> <source-resolution>72</source-resolution> <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi --> <target-resolution>72</target-resolution> <!-- Default page-height and page-width, in case value is specified as auto --> <default-page-settings height="11in" width="8.26in"/> <!-- Information for specific renderers --> <!-- Uses renderer mime type for renderers --> <renderers> <renderer mime="application/pdf"> <filterList> <!-- provides compression using zlib flate (default is on) --> <value>flate</value> <!-- encodes binary data into printable ascii characters (default off) This provides about a 4:5 expansion of data size --> <!-- <value>ascii-85</value> --> <!-- encodes binary data with hex representation (default off) This filter is not recommended as it doubles the data size --> <!-- <value>ascii-hex</value> --> </filterList> <fonts> <!-- embedded fonts --> <!-- This information must exactly match the font specified in the fo file. Otherwise it will use a default font. For example, <fo:inline font-family="Arial" font-weight="bold" font-style="normal"> Arial-normal-normal font </fo:inline> for the font triplet specified by: <font-triplet name="Arial" style="normal" weight="bold"/> If you do not want to embed the font in the pdf document then do not include the "embed-url" attribute. The font will be needed where the document is viewed for it to be displayed properly. possible styles: normal | italic | oblique | backslant possible weights: normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 (normal = 400, bold = 700) --> <font metrics-url="FTB_____.xml" kerning="yes" embed-url="FTB_____.PFB"> <font-triplet name="Frutiger-Bold" style="normal" weight="bold"/> <font-triplet name="Frutiger 45 Light" style="normal" weight="bold"/> </font> <font metrics-url="FTBC____.xml" kerning="yes" embed-url="FTBC____.PFB"> <font-triplet name="Frutiger-BoldCn" style="normal" weight="bold"/> <font-triplet name="Frutiger 47LightCn" style="normal" weight="bold"/> </font> <font metrics-url="FTBI____.xml" kerning="yes" embed-url="FTBI____.PFB"> <font-triplet name="Frutiger-BoldItalic" style="italic" weight="bold"/> <font-triplet name="Frutiger 45 Light" style="italic" weight="bold"/> </font> <font metrics-url="FTBL____.xml" kerning="yes" embed-url="FTBL____.PFB"> <font-triplet name="Frutiger-Black" style="normal" weight="normal"/> <font-triplet name="Frutiger 55 Roman" style="normal" weight="normal"/> </font> <font metrics-url="FTBLC___.xml" kerning="yes" embed-url="FTBLC___.PFB"> <font-triplet name="Frutiger-BlackCn" style="normal" weight="normal"/> <font-triplet name="Frutiger 57Cn" style="normal" weight="normal"/> </font> <font metrics-url="FTBLI___.xml" kerning="yes" embed-url="FTBLI___.PFB"> <font-triplet name="Frutiger-BlackItalic" style="italic" weight="normal"/> <font-triplet name="Frutiger 55 Roman" style="italic" weight="normal"/> </font> <font metrics-url="FTC_____.xml" kerning="yes" embed-url="FTC_____.PFB"> <font-triplet name="Frutiger-Cn" style="normal" weight="bold"/> <font-triplet name="Frutiger 57Cn" style="normal" weight="bold"/> </font> <font metrics-url="FTEBC___.xml" kerning="yes" embed-url="FTEBC___.PFB"> <font-triplet name="Frutiger-ExtraBlackCn" style="normal" weight="normal"/> <font-triplet name="Frutiger 87ExtraBlackCn" style="normal" weight="normal"/> </font> <font metrics-url="FTI_____.xml" kerning="yes" embed-url="FTI_____.PFB"> <font-triplet name="Frutiger-Italic" style="italic" weight="normal"/> <font-triplet name="Frutiger 55 Roman" style="italic" weight="normal"/> </font> <font metrics-url="FTL_____.xml" kerning="yes" embed-url="FTL_____.PFB"> <font-triplet name="Frutiger-Light" style="normal" weight="normal"/> <font-triplet name="Frutiger 45 Light" style="normal" weight="normal"/> </font> <font metrics-url="FTLC____.xml" kerning="yes" embed-url="FTLC____.PFB"> <font-triplet name="Frutiger-LightCn" style="normal" weight="normal"/> <font-triplet name="Frutiger 47LightCn" style="normal" weight="normal"/> </font> <font metrics-url="FTLI____.xml" kerning="yes" embed-url="FTLI____.PFB"> <font-triplet name="Frutiger-LightItalic" style="italic" weight="normal"/> <font-triplet name="Frutiger 45 Light" style="italic" weight="normal"/> </font> <font metrics-url="FTR_____.xml" kerning="yes" embed-url="FTR_____.PFB"> <font-triplet name="Frutiger-Roman" style="normal" weight="normal"/> <font-triplet name="Frutiger 55 Roman" style="normal" weight="normal"/> </font> <font metrics-url="FTUBL___.xml" kerning="yes" embed-url="FTUBL___.PFB"> <font-triplet name="Frutiger-UltraBlack" style="normal" weight="normal"/> <font-triplet name="Frutiger 95 UltraBlack" style="normal" weight="normal"/> </font> <font metrics-url="SY______.xml" kerning="yes" embed-url="SY______.PFB"> <font-triplet name="Symbol" style="normal" weight="normal"/> <font-triplet name="Symbol" style="normal" weight="bold"/> <font-triplet name="Symbol" style="italic" weight="normal"/> </font> <font metrics-url="ZD______.xml" kerning="yes" embed-url="ZD______.PFB"> <font-triplet name="ZapfDingbats" style="normal" weight="normal"/> <font-triplet name="ZapfDingbats" style="normal" weight="bold"/> <font-triplet name="ZapfDingbats" style="italic" weight="normal"/> </font> <!-- <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf"> <font-triplet name="Arial" style="normal" weight="normal"/> <font-triplet name="ArialMT" style="normal" weight="normal"/> </font> <font metrics-url="arialb.xml" kerning="yes" embed-url="arialb.ttf"> <font-triplet name="Arial" style="normal" weight="bold"/> <font-triplet name="ArialMT" style="normal" weight="bold"/> </font> --> </fonts> <!-- This option lets you specify additional options on an XML handler --> <!--xml-handler namespace="http://www.w3.org/2000/svg"> <stroke-text>false</stroke-text> </xml-handler--> </renderer> <renderer mime="application/postscript"> <!-- This option forces the PS renderer to rotate landscape pages --> <!--auto-rotate-landscape>true</auto-rotate-landscape--> <!-- This option lets you specify additional options on an XML handler --> <!--xml-handler namespace="http://www.w3.org/2000/svg"> <stroke-text>false</stroke-text> </xml-handler--> </renderer> <renderer mime="application/vnd.hp-PCL"> </renderer> <!-- MIF does not have a renderer <renderer mime="application/vnd.mif"> </renderer> --> <renderer mime="image/svg+xml"> <format type="paginated"/> <link value="true"/> <strokeText value="false"/> </renderer> <renderer mime="application/awt"> </renderer> <renderer mime="image/png"> <!--transparent-page-background>true</transparent-page-background--> </renderer> <renderer mime="image/tiff"> <!--transparent-page-background>true</transparent-page-background--> <!--compression>CCITT T.6</compression--> </renderer> <renderer mime="text/xml"> </renderer> <!-- RTF does not have a renderer <renderer mime="text/rtf"> </renderer> --> <renderer mime="text/plain"> <pageSize columns="80"/> </renderer> </renderers> </fop>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]