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 | ||
---|---|---|
function | getAutoFitPageToDrawingContent() | |
function | setAutoFitPageToDrawingContent(value) | |
Defines whether need enlarge page to fit drawing content or not. | ||
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. | ||
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 |
||
function | getWarningCallback() | |
function | setWarningCallback(value) | |
Gets or sets warning callback. |
Constructor Detail |
---|
function DiagramSaveOptions()
function DiagramSaveOptions(saveFormat)
saveFormat: Number
- A Property Getters/Setters Detail |
---|
getSaveFormat/setSaveFormat : Number | |
function getSaveFormat() / function setSaveFormat(value) |
getAutoFitPageToDrawingContent/setAutoFitPageToDrawingContent : boolean | |
function getAutoFitPageToDrawingContent() / function setAutoFitPageToDrawingContent(value) |
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) |
getWarningCallback/setWarningCallback : IWarningCallback | |
function getWarningCallback() / function setWarningCallback(value) |