Hi,
I m converting html table to docx using DOCX4J. However, the text in the last column gets truncated.
My code below
XHTMLImporterImpl xHTMLImporter = new XHTMLImporterImpl(wordMLPackage);
xHTMLImporter.setParagraphFormatting(FormattingOption.CLASS_PLUS_OTHER)
xHTMLImporter.setParagraphFormatting(FormattingOption.CLASS_PLUS_OTHER)
xHTMLImporter.setTableFormatting(FormattingOption.CLASS_PLUS_OTHER)
def text = xHTMLImporter.convert(result, null)
HTML
<table style="width:100%: table-layout: fixed;border-collapse:collapse;" >
<tr>
<th style="width:10%;>text1</th>
<th style="width:10%;>text2</th>
<th style="width:10%;>text3</th>
<th style="width:10%;>text4</th>
<th>text5</th>
</tr>
<tr>
<td>text1</td>
<td>text2</td>
<td>text3</td>
<td>text4</td>
<td>text5</td>
</tr>
Attached the screenshot of table.
Any help is appreciated.
Thanks in advance!