Hey Guys, I am trying to get my FOP processing system working with the latest FOP trunk, using the IF format.
Running tests I have found that when I use a custom font (I use Barcode 3 of 9 and 4 -State) I get a failure when using the FO -> IF -> PCL/PDF which states fontName must be null. I am under a reasonable amount of pressure and am happy to try and debug the issue myself, but any background you could give me on this part of the system may save me a bunch of time. I have Eclipse up and running, building the application and I'm able to start the fop.bat script with my required arguments and initiate debugging and step through the code. I notice when I use a font that is not in the default set, the system falls over with a fontName cannot be null error. It seems that if there was any prior validation on whether a font could be found or not, this process is thrown out the window when you go from FO -> IF -> PCL/PDF. For instance, drawText in PDFPainter.java gets called, but the triplet it's looking for does not exist in the collection returned by getFontInfo().getInternalFontKey(triplet); The stack trace is as follows; SEVERE: Exception java.lang.NullPointerException: fontName must not be null at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:239) 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:246) at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:269) at org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(I FParser.java:487) at org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java :277) at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerI dentityImpl.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$FragmentContentDispatc her.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 I've gotten myself in a bind where I have a job I should have delivered last week, and I need to be able to perform the job some way or another. I used to use FO - AT - PCL - but the PCL file was way too large, and using a PCL Page Counter there seemed to be double the amount of pages than there should have been (no idea whats going wrong there.). It was recommended to me by Andreas that due to the speed issues I was having, it might be more optimal to go for the new IF format, and from review of the XML that does seem to be the way to go. Additionally, due to the PCL file size being a problem, I could technically split the IF format into chunks before transporting to PCL. But alas, I am unlucky, and it doesn't seem to work for custom fonts properly. Thanks! Martin