// Put the html in result
org.w3c.dom.Document xhtmlDoc = org.docx4j.XmlUtils.neww3cDomDocument();
javax.xml.transform.dom.DOMResult result = new javax.xml.transform.dom.DOMResult(xhtmlDoc);
AbstractHtmlExporter exporter = new HtmlExporter();
exporter.html(wordMLPackage, result, false,
System.getProperty("java.io.tmpdir") ); // false -> don't use HTML fonts.
// Now render the XHTML
org.xhtmlrenderer.pdf.ITextRenderer renderer = new org.xhtmlrenderer.pdf.ITextRenderer();