I have to convert a docx file generated using (docx4j) to XHTML. Can you please share the code/point me to the same for accomplishing this ?
Thanks,
Goutham
It is currently Wed Dec 03, 2025 11:15 am
News of Forums // Add a table
int writableWidthTwips = wordMLPackage.getDocumentModel().getSections().get(0).getPageDimensions().getWritableWidthTwips();
int cols = 5;
int cellWidthTwips = new Double(Math.floor((writableWidthTwips/cols))).intValue();
Tbl tbl = TblFactory.createTable(1, 5, cellWidthTwips);
wordMLPackage.getMainDocumentPart().addObject(tbl);
Total posts 10213 • Total topics 2877 • Total members 2103