new DiagramSaveOptions()

Initializes a new instance of this class that can be used to save a diagram in the VDX format.

Example

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("VisioSaveOptions.vsdx");
// Options when saving a diagram into Visio format
options = new aspose.diagram.DiagramSaveOptions(aspose.diagram.SaveFileFormat.VSDX);
//  When characters in the diagram are unicode and not be set with
//  correct font value or the font is not installed locally, they may
//  appear as block in pdf, image or XPS. Set the DefaultFont such as
//  MingLiu or MS Gothic to show these characters.
options.setDefaultFont("MS Gothic");
// Defines whether need enlarge page to fit drawing content or not.
// Remarks:
// Default value is false.
options.setAutoFitPageToDrawingContent(true);
// save diagram
diagram.save("out-UseDiagramSaveOptions.vsdx", options);

Methods

constructor_overload$1(saveFormat)

Initializes a new instance of this class that can be used to save a diagram in the VDX or VSX format.

Parameter

Name Type Optional Description

saveFormat

Number

 

SaveFileFormat

getAutoFitPageToDrawingContent()

Defines whether need enlarge page to fit drawing content or not. Default value is false.

Example

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("BFlowcht.vsdx");
// use saving options
options = new aspose.diagram.DiagramSaveOptions(aspose.diagram.SaveFileFormat.VSDX);
// set Auto fit page property
options.setAutoFitPageToDrawingContent(true);
// save Visio diagram
diagram.save("out-AutoFitShapesInVisio.vsdx", options);

getDefaultFont()

When characters in the diagram are unicode and not be set with correct font value or the font is not installed locally, they may appear as block in pdf, image or XPS. Set the DefaultFont such as MingLiu or MS Gothic to show these characters.

getSaveFormat()

Specifies the format in which the rendered diagram will be saved if this save options object is used. Can be SaveFileFormat or SaveFileFormat. The value of the property is SaveFileFormat integer constant.

getWarningCallback()

Gets or sets warning callback.

setAutoFitPageToDrawingContent()

Defines whether need enlarge page to fit drawing content or not. Default value is false.

Example

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("BFlowcht.vsdx");
// use saving options
options = new aspose.diagram.DiagramSaveOptions(aspose.diagram.SaveFileFormat.VSDX);
// set Auto fit page property
options.setAutoFitPageToDrawingContent(true);
// save Visio diagram
diagram.save("out-AutoFitShapesInVisio.vsdx", options);

setDefaultFont()

When characters in the diagram are unicode and not be set with correct font value or the font is not installed locally, they may appear as block in pdf, image or XPS. Set the DefaultFont such as MingLiu or MS Gothic to show these characters.

setSaveFormat()

Specifies the format in which the rendered diagram will be saved if this save options object is used. Can be SaveFileFormat or SaveFileFormat. The value of the property is SaveFileFormat integer constant.

setWarningCallback()

Gets or sets warning callback.