A customer sent us a document that we could not preview via Docx4J.toFO
The link below contains an eclipse project in my dropbox folder that will reproduce the bug.
https://www.dropbox.com/s/d4ux58unonypz ... r.zip?dl=0
It contains the document, together with reproducing code inside an eclipse project. You should be able to open it with eclipse luna.
I'm not certain on the details of what happens, but it seems that the outline structure in the document is combined with a linefeed in such a way that a layout is made for an object that contains no elements. Apache FOP doesn't handle that situation very well. I can't tell if the fo output produced by docx4j is invalid or that the apache.fop import is being overly critical. At any rate, a change to org.apache.fop.layoutmgr.list.ListItemContentLayoutManager allows the document to be converted to PDF. The change is included in the zip file just uncomment it if you wish to see it in action.
I'm hoping one of you guys can use this information to fix this conversion issue.
For now we are helped by mirorring ListItemContentLayoutManager with the included changes, but I'm worried about future docx4j updates breaking this 'fix'... Clearly mirroring a file is not proper software development.