Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9980. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.
Thanks for your inquiry. We have logged WORDSNET-9980 to address the problem you mentioned in first point. Regarding your second point, please note that the SaveOptions.UseAntiAliasing property works only when the document is exported to the image formats such as Tiff, Png, Bmp, Jpeg. If we can help you with anything else, please feel free to ask.
I have logged a new feature request in our issue tracking system. The ID of this issue is WORDSNET-9996. Our development team will further look into the details of this problem and we will keep you updated on the status of this issue. We apologize for your inconvenience.
Thanks for your inquiry. I tested all your new documents with Aspose.Words for .NET 14.4.0 but was unable to observe any issue on my side. I suggest you please upgrade to the latest version, execute the following code on your end and see how it goes. I hope, this helps.
Document doc = new Document(MyDir + @"Formes flotantes vides.doc");
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.UseAntiAliasing = true;
imageSaveOptions.PaperColor = Color.Transparent;
int i = 0;
NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true);
foreach (Paragraph paragraph in paragraphs)
{
foreach (Node node in paragraph.ChildNodes)
{
if (node.NodeType == NodeType.Shape)
{
Shape shape = (Shape)node;
ShapeRenderer renderer = shape.GetShapeRenderer();
renderer.Save(@"C:\temp\img" + i + ".png", imageSaveOptions);
i++;
}
}
}
Regarding WORDSNET-9980, it is to update you that our development team has completed the analysis of this issue and has come to a conclusion that this issue and the undesired behaviour you’re observing is actually not a bug in Aspose.Words. So, we will most likely close this issue as ‘Not a Bug’.
The problem occurs because there are both Shapes and DrawingMLs inside this document. Calling GetShapeRenderer() method internally calls UpdatePageLayout() method, during this operation by default Aspose.Words replaces all DrawingMLs with fallback Shapes. Our Shapes collection is live that is why the same Shape is rendered twice. To avoid this problem you can call UpdatePageLayout() method before rendering shapes. Please see the following code:
NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
doc.UpdatePageLayout();
for (int i = 0; i < shapes.Count; i++)
{
Shape shape = (Shape)shapes[i];
ShapeRenderer renderer = shape.GetShapeRenderer();
renderer.Save(@"C:\\Temp\\img" + i + ".png", imageSaveOptions);
}