Bug 48076 - NPE when rendering a file containing a non-base14 font to IF XML then to PDF
Summary: NPE when rendering a file containing a non-base14 font to IF XML then to PDF
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: all
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-28 09:43 UTC by Vincent Hennebert
Modified: 2012-04-07 01:52 UTC (History)
0 users



Attachments
FO file triggering the exception (825 bytes, text/x-xslfo)
2009-10-28 09:43 UTC, Vincent Hennebert
Details
Font configuration file (389 bytes, application/octet-stream)
2009-10-28 09:44 UTC, Vincent Hennebert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Hennebert 2009-10-28 09:43:40 UTC
Created attachment 24435 [details]
FO file triggering the exception

See attachments. Files should be placed at the root of a FOP copy. To
reproduce:
    fop -c config.xconf non-standard-font -if application/pdf if.xml
    fop -c config.xconf -ifin if.xml non-standard-font.pdf

You get the following exception:
java.lang.NullPointerException: fontName must not be null
    at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
    at org.apache.fop.cli.IFInputHandler.renderTo(IFInputHandler.java:77)
    at org.apache.fop.cli.Main.startFOP(Main.java:174)
    at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: java.lang.NullPointerException: fontName must not be null
    at org.apache.fop.render.pdf.PDFPainter.getTypeface(PDFPainter.java:285)
    at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:320)
    at
org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:569)
    at
org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:352)
    at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
    at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
    ... 3 more
Comment 1 Vincent Hennebert 2009-10-28 09:44:33 UTC
Created attachment 24436 [details]
Font configuration file
Comment 2 Glenn Adams 2012-04-07 01:44:17 UTC
resetting P2 open bugs to P3 pending further review