Locked matrix cannot be changed.docx (312.1 KB)
This file convert to svg,throw exception
java.lang.IllegalStateException: Locked matrix cannot be changed.
May I ask how to solve the problem?
Locked matrix cannot be changed.docx (312.1 KB)
This file convert to svg,throw exception
java.lang.IllegalStateException: Locked matrix cannot be changed.
May I ask how to solve the problem?
@jingyao066 Unfortunately, I cannot reproduce the problem on my side. Here is code I have used for testing:
Document doc = new Document("C:\\Temp\\in.docx");
SvgSaveOptions options = new SvgSaveOptions();
for (int i = 0; i < doc.getPageCount(); i++)
{
options.setPageSet(new PageSet(i));
doc.save("C:\\Temp\\out_" + i + ".svg", options);
}
The conversion was performed using the latest 22.7 version of Aspose.Words for Java. So please try using the latest version of Aspose.Words for Java.
I am able to reproduce with the latest version (22.8). Here is the code I used
@Test
public void test() throws Exception {
Document doc = new Document("C:\\test\\adhoc.docx");
doc.accept(new DocumentVisitor() {
@Override
public int visitShapeStart(Shape shape) throws Exception {
shape.getShapeRenderer()
.save(new ByteArrayOutputStream(), new ImageSaveOptions(SaveFormat.SVG));
return VisitorAction.CONTINUE;
}
});
}
Here is the docx file.
adhoc.docx (19.3 KB)
@fzeng2012 Thank you for additional information. I have managed to reproduce the problem. For a sake of correction it has been logged as WORDSNET-24278. We will keep you informed and let you know once it is resolved.
The issues you have found earlier (filed as WORDSNET-24278) have been fixed in this Aspose.Words for Java 22.10 update also available on Maven.