java - Error while openning of saved by docx4j files with some version of Office 10 -
i've created document using following unit test
@test public void testconvert() throws docx4jexception { wordprocessingmlpackage wordmlpackage = wordprocessingmlpackage.createpackage(); wordmlpackage.getmaindocumentpart().addparagraphoftext("hello"); // save wordmlpackage.save(new java.io.file("/home/user/docx/sample.docx") ); }
but have error (file corrupted) while opening file versions of microsoft office 10 home , business (version 14.0.6112.5000). @ same time works fine latest versions of microsoft office 10, open office, office365 , liber office.
is there way fix problem able open document version of office 10. thanks
probably problem docx4j.properties property: docx4j.appversion
docx4j.appversion=3.3 # of form xx.yyyy x , y repre**strong text**sent numerical values # warning: -snapshot cause word 2010 x64 treat docx corrupt!
make sure value 3.2 or 3.3, rather 3.2.1
or set docx4j.app.write=false
Comments
Post a Comment