plutext / docx4j-ImportXHTML

Converts XHTML to OpenXML WordML (docx) using docx4j
136 stars 125 forks source link

Center table #66

Open achimmihca opened 3 years ago

achimmihca commented 3 years ago

Centering a table does not work properly (same for align right).

I tried:

The first seems to set a indentation. The second seems to do nothing.

Instead, a jc-element (justification) inside tblPr (tableProperties) should be generated:

...
    <w:tbl>
            <w:tblPr>
                <w:jc w:val="center"/>
...

Above XML is created by MS Word when selecting center under right click on table > table properties


As workaround for now, one can set margin-left to a fitting value if the table width is known.

Abhinandan578 commented 1 year ago

hey @achimmihca i am also facing the same issue with alignment. Has there been any development or updates on this.

achimmihca commented 1 year ago

I don't know of any developments