Project: Birt
Bug 103106 Generates incompatible FOP files
Reported: 2005-07-07 19:39:26 | Status: resolved fixed

This bug originates from my thread on the eclipse.birt newsgroup. I have configured the Birt RunAndRenderTask to use FORenderOption options with the TailoredForFOP option set to true. Using the generated .fo file (TestReport.fo in the example below), I try to convert it to a PDF using FOP v0.20.5 from command line. The errors below occur. I then hand-modified the .fo file to remove the "text-transform", "word-spacing", and "letter spacing" tags from the file, which removed the first 6 errors. The ClassCastException remains. Help? D:\FOP\fop-0.20.5>fop.bat -fo TestReport.fo -print -d [DEBUG] Input mode: [DEBUG] FO [DEBUG] fo input file: TestReport.fo [DEBUG] Output mode: [DEBUG] print directly [DEBUG] OPTIONS [DEBUG] no user configuration file is used [default] [DEBUG] debug mode on [DEBUG] dump configuration [DEBUG] quiet mode on [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] base directory: file:/D:/FOP/fop-0.20.5/ [INFO] FOP 0.20.5 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [ERROR] property - "text-transform" is not implemented yet. [ERROR] Error in letter-spacing property value 'normal': org.apache.fop.fo.expr.PropertyException: No conversion defined [ERROR] property - "word-spacing" is not implemented yet. [ERROR] property - "text-transform" is not implemented yet. [ERROR] Error in letter-spacing property value 'normal': org.apache.fop.fo.expr.PropertyException: No conversion defined [ERROR] property - "word-spacing" is not implemented yet. [INFO] [1] [ERROR] null org.apache.fop.apps.FOPException at org.apache.fop.apps.PrintStarter.run(PrintStarter.java:125) at org.apache.fop.apps.Fop.main(Fop.java:62) --------- java.lang.ClassCastException at org.apache.fop.fo.flow.BlockContainer.layout(BlockContainer.java:157) at org.apache.fop.fo.flow.Block.layout(Block.java:257) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110) at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223) at org.apache.xerces.parsers.AbstractSAXParser.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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.fop.apps.Driver.render(Driver.java:498) at org.apache.fop.apps.PrintStarter.run(PrintStarter.java:120) at org.apache.fop.apps.Fop.main(Fop.java:62) --------- java.lang.ClassCastException at org.apache.fop.fo.flow.BlockContainer.layout(BlockContainer.java:157) at org.apache.fop.fo.flow.Block.layout(Block.java:257) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110) at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223) at org.apache.xerces.parsers.AbstractSAXParser.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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.fop.apps.Driver.render(Driver.java:498) at org.apache.fop.apps.PrintStarter.run(PrintStarter.java:120) at org.apache.fop.apps.Fop.main(Fop.java:62)

Files changed in fix:
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RunAndRenderTask.java