We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Shape's Interaction with each other in regard to Positioning


I am struggling to understand what is causing something strange to happen with my diagram.

I have attached a picture which contains two diagrams that I saved into a picture for comparison.

For reference, basically you are seeing “Shelves” and “Products” on said shelves. That’s the essence of what I am trying to diagram.

In Diagram 1 (top) you see that the “Products” (rectangles) are aligned to the left edge of the diagram.

In Diagram 2 (bottom) you see that the rectangles have been shifted over as a result of the green “Shelves” being added below the products.

I do not understand why the addition of the green rectangle would cause other shapes on the diagram to reposition.

Any urgency to reply to this would be greatly appreciated as I am trying to implement something for a deadline tomorrow,


Hi Nick,

Thank you for contacting support. It appears as the autosize page option is enabled. Please disable it before calling the Save method of Diagram class as follows:

[.NET, C#]
// use saving options
DiagramSaveOptions options = new DiagramSaveOptions(SaveFileFormat.VSDX);

// set Auto fit page property
options.AutoFitPageToDrawingContent = false;

// save Visio diagram
diagram.Save(“c:\temp\Output.vsdx”, options);

In case, this does not work, then please provide us your source Visio diagram and sample code. We'll investigate and reply you appropriately.

Thank you Imran. I will implement your suggested code and let you know if anything doesn’t work properly.

Hi Nick,

Sure, please take your time and let us know about your precious feedback. We'll be happy to help you in using Aspose APIs in your application projects.