I have started to add support for the tl2br and tr2bl cell borders to the XSLFO pdf creator.
I've extended the propertyFactory, added two new classes to the new org.docx4j.model.properties.table and I tried to extend the fop.xsd. Unfortunatly it is not working yet and gives me the following exception:
org.docx4j.openpackaging.exceptions.Docx4JException: FOP issues
at org.docx4j.convert.out.pdf.viaXSLFO.Conversion.output(Conversion.java:357)
at PdfGenerator.main(PdfGenerator.java:34)
Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:table-cell": border-tl2br-color (Siehe Position 11:630)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
at org.docx4j.convert.out.pdf.viaXSLFO.Conversion.output(Conversion.java:350)
... 1 more
Caused by: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:table-cell": border-tl2br-color (Siehe Position 11:630)
at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
at $Proxy38.invalidProperty(Unknown Source)
at org.apache.fop.fo.PropertyList.handleInvalidProperty(PropertyList.java:470)
at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:389)
at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:319)
at org.apache.fop.fo.FObj.processNode(FObj.java:119)
at org.apache.fop.fo.flow.table.TableFObj.processNode(TableFObj.java:233)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:282)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
... 2 more
Can you please have a look at my patch and tell me what further work has to be done to get things going. I also attached my test document.
Thx,
Richard