Page 1 of 1

Issue with table width

PostPosted: Sat Nov 19, 2016 8:44 am
by qvc
hi, i have some strange issue with table width. It's a simple html:
Code: Select all
<html>
    <body>
        <table width=\"100%\">
            <tr>
                <td width=\"33%\">aaa</td>
                <td width=\"33%\">aaa</td>
                <td width=\"33%\">aaa</td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td></td>
            </tr>
        </table>
    </body>
</html>


ad here is how i convert it:

Code: Select all
            XHTMLImporterImpl XHTMLImporter = new XHTMLImporterImpl(docxOut);
            XHTMLImporter.setParagraphFormatting(FormattingOption.CLASS_PLUS_OTHER);
            XHTMLImporter.setRunFormatting(FormattingOption.CLASS_PLUS_OTHER);
            XHTMLImporter.setTableFormatting(FormattingOption.IGNORE_CLASS);
           
            XHTMLImporter.setHyperlinkStyle("Hyperlink");
            final List<Object> parsedHtml = XHTMLImporter.convert(htmlString, null);
           
            docxOut.getMainDocumentPart().getContent().addAll(parsedHtml);


unfortunatelly in a result docx table is oversized and 3rd column is barely visible (you can see it in attachment). Is there a way to fix this?

Re: Issue with table width

PostPosted: Thu Dec 08, 2016 2:25 am
by qvc
anyone can help?

Re: Issue with table width

PostPosted: Thu Oct 03, 2019 8:06 pm
by str3cx
this is an old post and nobody answered,
but can you please tell us how did you fixed that issue? thanks
I also have the same problem with image size.

I've been wandering the internet searching a solution for 4 days and found not viable answer.
is this library dead? should we search for another library?