I am looking to use Docx4j, specifically to convert html pages to word documents, so I was playing around with it, but I am unable to get the sample code in the git repo to work.
XHTML URL to word doc specifically is what is causing me issues. When I run the code, I obtain a mass of errors when converting, such as
[http-bio-8080-exec-10] ERROR run.FontSize - TODO FontSize Handle units: 2
as well as other errors relating to getColWidth for col1, among other things. When it finally crashes, I get a nullPointerExeption
@ line 974 | traverse in org.docx4j.convert.in.xhtml.XHTMLImporterImpl
which is if (listHelper.peekListStack().getElement()!=null
&& listHelper.peekListStack().getElement().getAttribute("class")!=null)
Are there any configuration changes I need to make to get the XHTMLImporter working out of the box?
I am using it from this Maven Repo, and this seems to be the most up to date version.
Docx4j seems to be working fine by itself, as I have successfully created and written to a docx file, but this issue seems to be plugin-specific. Any ideas on what is happening?