Image is Lost when Document is Saved to DOCX with Iso29500_2008_Strict using .NET


I’m using Aspose.Words 21.5.0 and was hoping you could advise me on the following:

I’m saving documents with Compliance save option set to Iso29500_2008_Strict as setting it to anything else caused images to be cropped incorrectly. I’ve noticed that this compliance setting causes some shape nodes to loose the image entirely and generate as blank shapes.

I’ve attached an example input (InputDocument.docx (140.2 KB) which I run through the following code:

         var document = new Document(@"input path goes here");
        var defaultSaveOptions = new OoxmlSaveOptions();
        var updatedSaveOptions = new OoxmlSaveOptions{Compliance = OoxmlCompliance.Iso29500_2008_Strict};
        document.Save(@"first output path goes here", defaultSaveOptions);
        document.Save(@"second output file path goes here", updatedSaveOptions);

as you’ll notice, when the document is saved with default options, the image in the header is still present, but if it is saved with Compliance set to Iso29500_2008_Strict the shape that should contain the image is blank.

Could you please advise what I can do to ensure the image is saved properly when using the updated Compliance option? Going back to the default Compliance setting is not really a viable solution for me as it caused several other shape nodes to generate with incorrect size and cropping their contents.



We have logged this problem in our issue tracking system as WORDSNET-22566. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-22566) have been fixed in this Aspose.Words for .NET 21.9 update.