Html to docx with Docx4j break table when page skip

384 Views Asked by At

I using docx4j to generated a docx from html string, works great but the tables broken when the page skip.

Table broken

This the code.

WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();

XHTMLImporterImpl XHTMLImporter = new XHTMLImporterImpl(wordMLPackage);

//File is a htmlStringFile 
wordMLPackage.getMainDocumentPart().getContent().addAll(XHTMLImporter.convert(file, null) );

File fileDos = new File(urlWord);

I´m using a docx4j 8.3.2 with Java 8.

Somebody know how to change all properties in the general document ? Example : space between paragraph, space after the line,

Another problem, in some case the table cell add diferent space between cell. I don´t know why

cell add diferent space

0

There are 0 best solutions below