The document is not getting opened in lower version(MS word below 2010)
Clients are not ready to upgrade MS word.
Kindly let me know is there any alternate to open the doc created by docx4j in lower version itself.
Please assit on the above
It is currently Thu Jun 26, 2025 2:57 am
OpenDoPEIntegrity odi = new OpenDoPEIntegrity();
odi.process(wordMLPackage);
org.docx4j.XmlUtils.transform(doc, xslt, transformParameters, result);
LoadFromZipNG loader = new LoadFromZipNG();
try {
tmpPkg = (WordprocessingMLPackage)loader.get(docxInputStream);
} catch (Exception e) {
throw new Docx4JException("Error reading docx file (is this a valid docx?)");
}
// ByteBuffer myImage ...
byte[] bytes = myImage.array();
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage
.createImagePart(wordMLPackage, bytes);
int docPrId = 1;
int cNvPrId = 2;
Inline inline = imagePart.createImageInline(image_ID,
image_description, docPrId, cNvPrId, true);
<img height="11" width="11" src="images/example.png"/>
<img height="11px" width="11px" src="images/example.png"/>
img {
width:11px;
height:11px;
}
Total posts 10181 • Total topics 2864 • Total members 2095