Unreadable content created

Hi,

we use Aspose Version 17.2.0.0 and we get unreadable content if
we save attached document
Test.zip (107.0 KB)
Test.zip (107.0 KB)
Test.zip (107.0 KB)
Test.zip (107.0 KB)

with following code.

byte[] stream = System.IO.File.ReadAllBytes(“test.docx”);
using (MemoryStream memContent = new MemoryStream(stream))
{
Aspose.Words.Document doc = new Aspose.Words.Document(memContent);
doc.Save(“test2.docx”);
}

I know the issue is fixed with latest version but I need to know what the issue was.
I already know that it relates to the graph. Customer needs a workaround because he cannot update at the moment.

Kind regards,
Hristo

@hmitov,

Thanks for your inquiry. Please note that we do not provide support for older versions of Aspose.Words. We always encourage our customers to use the latest version of Aspose.Words as it contains newly introduced features and enhancements.

Please convert the chart to image as shown below to workaround this issue. Hope this helps you.

Document doc = new Document(MyDir + "test.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
foreach (Shape shape in doc.GetChildNodes(NodeType.Shape, true))
{
    if (shape.HasChart)
    {
        MemoryStream stream = new MemoryStream();
        shape.GetShapeRenderer().Save(stream, new ImageSaveOptions(SaveFormat.Png));
        builder.MoveTo(shape);
        builder.InsertImage(stream.ToArray());
        shape.Remove();
    }
}

doc.Save(MyDir + "output.docx");

Hi Tahir,

for sure we recommend to use the latest version of Aspose.Version.
But customer has installation time frames and cannot update outside these frames.

The customer needs the object as a graph. It is not an option to convert it to an image.
Can you check what was the issue in previous version ?

Kind regards,
Guido

@hmitov,

Thanks for your inquiry. As shared in my previous post, we do not provide support for older versions of Aspose.Words. Please upgrade to the latest version of Aspose.Words for .NET 17.9.