Open valimaties opened 1 year ago
Ok... I found the issue here: I created the columns dinamically, by adding cells to the row, not creating columns specifically! Now, adding columns to the grid, the code from the document.xml file looks like this:
(...)
<w:tbl>
<w:tblPr>
<w:tblW w:w="5000" w:type="pct"/>
<w:jc w:val="center"/>
<w:tblBorders>
<w:top w:val="single"/>
<w:left w:val="single"/>
<w:bottom w:val="single"/>
<w:right w:val="single"/>
<w:insideH w:val="single"/>
<w:insideV w:val="single"/>
</w:tblBorders>
</w:tblPr>
<w:tblPr>
<w:tblStyle w:val="Table Grid"/>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="500"/>
<w:gridCol w:w="1000"/>
<w:gridCol w:w="1000"/>
<w:gridCol w:w="2000"/>
<w:gridCol w:w="500"/>
</w:tblGrid>
(...)
However, I consider this a bug! A table does not need columns, but only rows cells... Columns could be read from how many cells are in the row. This is a simple table, where somehow the columns could be defined. But there could be tables where "a column" could contain multiple cells, or the cells in the header could be merged, splitted, and so on... so, we must have rows with cells, which have some width and height...
However, I consider this a bug!
Any contribution are welcome!
Hi. Trying to convert a DOCX document build with Apache POI 5.2.3 will give me this error:
My document loads from a template which contains an image inside. I add paragraphs and tables inside, it's ok when I save it as docx and open it as docx. But using the generated XWPFDocument to convert it to PDF using this library gives me this error.
Any clue?
EDIT:
This is the start of the table inside "document.xml" file from the docx file: