Free Support Forum - aspose.com

Setting AutoFitPageToDrawingContent does not fit to page content


#1

Hello!

I am running the code example from

https://github.com/aspose-diagram/Aspose.Diagram-for-.NET/tree/master/Examples ->
Working-Diagrams/AutoFitShapesInVisio.cs

with Aspose.Diagram 19.1.0 Version:

public static void Run()
{
	// ExStart:AutoFitShapesInVisio
	// The path to the documents directory.
	string dataDir = RunExamples.GetDataDir_Diagrams();

	// Load a Visio diagram
	Diagram diagram = new Diagram(dataDir + "BFlowcht - 2.vsdx");

	// Use saving options
	DiagramSaveOptions options = new DiagramSaveOptions(SaveFileFormat.VSDX);
	// Set Auto fit page property
	options.AutoFitPageToDrawingContent = true;

	// Save Visio diagram
	diagram.Save(dataDir + "AutoFitShapesInVisio_out.vsdx", options);
	// ExEnd:AutoFitShapesInVisio
}

However, i could not manage to get the saved file fitting to the page like i would do in Microsoft Visio application -> Design -> Size -> Fit to Drawing

I have attached screenshots of input and result files.

Pleas let me know if i am missing something?

Many thanks in advance,
best regards

input.PNG (21.6 KB)

result.PNG (25.8 KB)


#2

@wedoIT-Development

Thanks for contacting support.

We have tested the scenario in our environment and obtained different output as result (i.e. AutoFitShapesInVisio_out.zip (32.0 KB)). However, we did notice that the page was not fit to drawing content as it was obtained using MS Visio.

We have logged this issue as DIAGRAMNET-51613 in our issue tracking system for the sake of correction. We will let you know as soon as some definite updates are available regarding its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.


#3

Thanks very much and take your time, i am waiting for your update.


#4

@wedoIT-Development

Thanks for your feedback.

We will surely notify you as soon as any update is available regarding ticket resolution.