aspose.diagram
Class DiagramSaveOptions

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.

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);

Constructor Summary
DiagramSaveOptions()
           Initializes a new instance of this class that can be used to save a diagram in the VDX format.
DiagramSaveOptions(saveFormat)
           Initializes a new instance of this class that can be used to save a diagram in the VDX or VSX format.
 
Property Getters/Setters Summary
functiongetAutoFitPageToDrawingContent()
functionsetAutoFitPageToDrawingContent(value)
           Defines whether need enlarge page to fit drawing content or not.
functiongetDefaultFont()
functionsetDefaultFont(value)
           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.
functiongetSaveFormat()
functionsetSaveFormat(value)
           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.
functiongetWarningCallback()
functionsetWarningCallback(value)
           Gets or sets warning callback.
 

Constructor Detail

DiagramSaveOptions

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

DiagramSaveOptions

function DiagramSaveOptions(saveFormat)
Initializes a new instance of this class that can be used to save a diagram in the VDX or VSX format.
Parameters:
saveFormat: Number - A SaveFileFormat value.

Property Getters/Setters Detail

getSaveFormat/setSaveFormat : Number 

function getSaveFormat() / function setSaveFormat(value)
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.

getAutoFitPageToDrawingContent/setAutoFitPageToDrawingContent : boolean 

function getAutoFitPageToDrawingContent() / function setAutoFitPageToDrawingContent(value)
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/setDefaultFont : String 

function getDefaultFont() / function setDefaultFont(value)
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.

getWarningCallback/setWarningCallback : IWarningCallback 

function getWarningCallback() / function setWarningCallback(value)
Gets or sets warning callback.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.