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 Fri May 09, 2025 6:52 pm
// 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 10161 • Total topics 2860 • Total members 2089