DiagramSaveOptions

DiagramSaveOptions class

Can be used to specify additional options when saving a diagram into Visio (VDX\VSX) format. At the moment provides only the SaveFormat property, but in the future will have other options added.

new DiagramSaveOptions()

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

Methods

NameDescription
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.
getAutoFitPageToDrawingContent()Defines whether need enlarge page to fit drawing content or not. Default value is false.
getDefaultFont()When characters in the diagram are unicode and not be set with correct font value or the font is not installed locally,
getSaveFormat()Specifies the format in which the rendered diagram will be saved if this save options object is used. Can be SaveFileFor
getWarningCallback()Gets or sets warning callback.
setAutoFitPageToDrawingContent()Defines whether need enlarge page to fit drawing content or not. Default value is false.
setDefaultFont()When characters in the diagram are unicode and not be set with correct font value or the font is not installed locally,
setSaveFormat()Specifies the format in which the rendered diagram will be saved if this save options object is used. Can be SaveFileFor
setWarningCallback()Gets or sets warning callback.

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.

ParameterTypeDescription
saveFormatNumberSaveFileFormat

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.