Page

Page class

Contains elements that define a page in the document.

new Page()

Constructor.

Methods

NameDescription
addActiveXControl(type, pinX, pinY, width, height)Creates an Activex Control.
addComment(shapeID, comment)Adds comment to a shape with shape’s id.
addComment(shape, comment)Adds comment to a shape.
addComment(pinX, pinY, comment)Adds comment with defined PinX and PinY.
addShape(pinX, pinY, masterName, isCalculate)Adds shape created by master on page with defined PinX and PinY.
addShape(pinX, pinY, width, height, masterName, isCalculate)Adds shape created by master on page with defined PinX and PinY.
addShape(pinX, pinY, masterName)Adds shape created by master on page with defined PinX and PinY.
addShape(pinX, pinY, width, height, masterName)Adds shape created by master on page with defined PinX,PinY,Width and Height.
addShape(newShape, masterName)Adds shape created by master to specific page.
addText(pinX, pinY, width, height, text, fontName, fontColor, size)Adds Text with defined PinX and PinY.
addText(pinX, pinY, text)Adds Text with defined PinX and PinY.
applyStyle(textStyle, lineStyle, fillStyle)Applies style for full page. Default value is -1.
autoSpaceShapes(shapes)Auto space shapes
bringForward(shapeId)Brings a shape,defined by ID, forward one position in the z-order.
bringToFront(shapeId)Brings a shape,defined by ID, to the front of the z-order.
centerDrawing()Centers a page’s shapes with respect to the extent of the page. Centering shapes does not change their position relative
connectShapesViaConnector(shapeFrom, placeFrom, shapeTo, placeTo, connector)Connect shapes via connector.
connectShapesViaConnector(shapeFromId, placeFrom, shapeToId, placeTo, connectorId)Connect shapes via connector.
connectShapesViaConnector(shapeFromId, fromConnectionName, shapeToId, toConnectionName, connectorId)Connect shapes via connector.
connectShapesViaConnectorIndex(shapeFromId, fromIndex, shapeToId, toIndex, connectorId)Connect shapes via connector index.
connectShapesViaConnectorIndex(shapeFrom, fromIndex, shapeTo, toIndex, connector)Connect shapes via connector index.
constructor_overload$1()Constructor.
copy()
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
drawEllipse(pinX, pinY, width, height)The process of drawing Ellipse.
drawLine(beginX, beginY, endX, endY)The process of drawing a single line.
drawLine(pinX, pinY, width, height, xyArray)The process of drawing line.
drawOwal(x1, y1, x2, y2)The process of drawing owal.
drawPolyline(xyArray)The process of drawing Polyline.
drawPolyline(pinX, pinY, width, height, xyArray)The process of drawing Polyline.
drawRectangle(pinX, pinY, width, height)The process of drawing rectangle.
drawRectangle(x1, y1, x2, y2)The process of drawing rectangle.
dropContainer(targetShape)The process of creating Container.
getAssociatedPage()The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.
getBackground()A flag indicating if the page is a background page. The value of the property is BOOL integer constant.
getBackPage()The page’s background page.
getConnects()Contains a Connect element for each connection between two shapes in a drawing.
getID()The unique ID of the element within its parent element.
getName()The name of the element.
getNameU()The universal name of the element.
getPages()Page collection.
getPageSheet()Contains elements that define the page sheet for a Page or Master element.
getReviewerID()The ID of the reviewer associated with the markup overlay.
getShapes()Shape collection.
getViewCenterX()ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initiall
getViewCenterY()ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initiall
getViewScale()The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150
glueShapes(shapeFrom, placeTo, shapeTo)Glue shapes.
glueShapes(shapeFromId, placeTo, shapeToId)Glue shapes
glueShapesInContainer(shapeFromId, shapeToBeginConnectionName, shapeToEndConnectionName, shapeToId)Glue shapes in container using connection name
glueShapesInContainer(shapeFromId, shapeToBeginConnectionIndex, shapeToEndConnectionIndex, shapeToId)Glue shapes in container
glueShapesInContainerByID(shapeFromId, shapeToBeginConnectionID, shapeToEndConnectionID, shapeToId)Glue shapes by connection id in container
glueShapeToConnectorBeginX(shapeFromId, connectionName, connectorId)Glue shape to Connector’s BeginX
glueShapeToConnectorEndX(shapeToId, connectionName, connectorId)Glue shape to Connector’s EndX
layout(options)Lays out the shapes and/or reroutes the connectors for the page.
moveTo(index)Moves the page to another location in the pages.
sendBackward(shapeId)Moves a shape,defined by ID, back one position in the z-order.
sendToBack(shapeId)Moves a shape,defined by ID, to the back of the z-order.
setAssociatedPage()The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.
setBackground()A flag indicating if the page is a background page. The value of the property is BOOL integer constant.
setBackPage()The page’s background page.
setID()The unique ID of the element within its parent element.
setName()The name of the element.
setNameU()The universal name of the element.
setPages()Page collection.
setPresetTheme()Apply a preset theme to this page The value of the property is PresetThemeValue integer constant.
setPresetThemeQuickStyle()Apply a preset theme variant quickstyle to this page The value of the property is PresetQuickStyleValue integer constant
setPresetThemeVariant()Apply a preset theme variant to this page The value of the property is PresetThemeVariantValue integer constant.
setReviewerID()The ID of the reviewer associated with the markup overlay.
setViewCenterX()ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initiall
setViewCenterY()ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initiall
setViewScale()The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150

addActiveXControl(type, pinX, pinY, width, height)

Creates an Activex Control.

ParameterTypeDescription
typeNumberControlType
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the shape in inches.
heightNumberSpecifies the height of the shape in inches.

Returns: long — long

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
// Instantiate Diagram Object
diagram = new aspose.diagram.Diagram();
// Insert an ActiveX control
diagram.getPages().get(0).addActiveXControl(aspose.diagram.ControlType.IMAGE, 1, 1, 1, 1);
diagram.save("out-InsertActiveXControl.vsdx", aspose.diagram.SaveFileFormat.VSDX);

addComment(shapeID, comment)

Adds comment to a shape with shape’s id.

ParameterTypeDescription
shapeIDlongThe ID of shape which is adding comment.
commentStringComment’s string.

addComment(shape, comment)

Adds comment to a shape.

ParameterTypeDescription
shapeShapeSpecifies the shape which is adding comment .
commentStringComment’s string.

addComment(pinX, pinY, comment)

Adds comment with defined PinX and PinY.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the comment’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the comment’s pin (center of rotation) in relation to the page.
commentStringComment’s string.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
var diagram = new aspose.diagram.Diagram("Drawing1.vsdx");
// Add comment
diagram.getPages().getPage(0).addComment(7.205905511811023, 3.880708661417323, "test@");
// Save diagram
diagram.save("out-AddPageLevelCommentInVisio.vsdx", aspose.diagram.SaveFileFormat.VSDX);

addShape(pinX, pinY, masterName, isCalculate)

Adds shape created by master on page with defined PinX and PinY.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
masterNameStringMaster’s name.
isCalculatebooleanIs Calculate shape or not.

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

addShape(pinX, pinY, width, height, masterName, isCalculate)

Adds shape created by master on page with defined PinX and PinY.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the shape in inches.
heightNumberSpecifies the height of the shape in inches.
masterNameStringMaster’s name.
isCalculatebooleanIs Calculate shape or not.

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

addShape(pinX, pinY, masterName)

Adds shape created by master on page with defined PinX and PinY.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
masterNameStringMaster’s name.

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

addShape(pinX, pinY, width, height, masterName)

Adds shape created by master on page with defined PinX,PinY,Width and Height.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the shape in inches.
heightNumberSpecifies the height of the shape in inches.
masterNameStringMaster’s name.

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

addShape(newShape, masterName)

Adds shape created by master to specific page.

ParameterTypeDescription
newShapeShapeNew shape object
masterNameStringMaster’s name.

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

addText(pinX, pinY, width, height, text, fontName, fontColor, size)

Adds Text with defined PinX and PinY.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the text’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the text’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the text.
heightNumberSpecifies the height of the text.
textStringtext string.
fontNameStringtext font name.
fontColorStringtext font color.
sizeNumbertext font size.

Returns: Shape — Shape Returns a shape object that represents the new text object.

addText(pinX, pinY, text)

Adds Text with defined PinX and PinY.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the text’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the text’s pin (center of rotation) in relation to the page.
textStringtext string.

Returns: Shape — Shape Returns a shape object that represents the new text object.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram();
// set parameters
PinX = 1, PinY = 1, Width = 1, Height = 1;
text = "Test text";
// add text to a Visio page
diagram.getPages().getPage(0).addText(PinX, PinY, Width, Height, text);
diagram.save("out-InsertTextShape.vsdx", aspose.diagram.SaveFileFormat.VSDX);

applyStyle(textStyle, lineStyle, fillStyle)

Applies style for full page. Default value is -1.

ParameterTypeDescription
textStyleNumbertext Style id.
lineStyleNumberline Style id.
fillStyleNumberfill Style id.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("ReadDiagramFile.vsd");
//Define a new StyleSheet
st = new aspose.diagram.StyleSheet();
st.setID(diagram.getStyleSheets().getCount() + 1);
ch = new aspose.diagram.Char();
ch.getColor().setValue("#00ff00");
ch.setIX(0);
st.getChars().add(ch);
st.getLine().getLineColor().setValue("#ff0000");
st.getLine().getLinePattern().setValue(1);
st.getLine().getLineWeight().setValue(0.01);
st.getFill().getFillForegnd().setValue("#0000ff");
st.getFill().getFillPattern().setValue(1);
st.getFill().getShdwPattern().setValue(0);
//Add the stylesheet to Stylesheets collection
diagram.getStyleSheets().add(st);
shapes = diagram.getPages().get(0).getShapes();
for (var it = shapes.iterator(); it.hasNext();) {
shape = it.next();
shape.getLine().getLinePattern().setValue(1);
shape.getFill().getFillPattern().setValue(1);
}
//Apply the stylesheet
diagram.getPages().get(0).applyStyle(st.getID(), st.getID(), st.getID());
diagram.save("out-ApplyStyleToVisioDiagramPage.vsdx", aspose.diagram.SaveFileFormat.VSDX);

autoSpaceShapes(shapes)

Auto space shapes

ParameterTypeDescription
shapesShapeCollectionSpecifies the shapes be auto spaced.

bringForward(shapeId)

Brings a shape,defined by ID, forward one position in the z-order.

ParameterTypeDescription
shapeIdlongID of shape.

bringToFront(shapeId)

Brings a shape,defined by ID, to the front of the z-order.

ParameterTypeDescription
shapeIdlongID of shape.

centerDrawing()

Centers a page’s shapes with respect to the extent of the page. Centering shapes does not change their position relative to each other.

connectShapesViaConnector(shapeFrom, placeFrom, shapeTo, placeTo, connector)

Connect shapes via connector.

ParameterTypeDescription
shapeFromShapeThe shape where the connector begins
placeFromNumberConnectionPointPlace
shapeToShapeThe shape where the connector ends
placeToNumberConnectionPointPlace
connectorShapeThe shape with type Dynamic connector

connectShapesViaConnector(shapeFromId, placeFrom, shapeToId, placeTo, connectorId)

Connect shapes via connector.

ParameterTypeDescription
shapeFromIdlongThe ID of shape where the connector begins
placeFromNumberConnectionPointPlace
shapeToIdlongThe ID of shape where the connector ends
placeToNumberConnectionPointPlace
connectorIdlongThe ID of shape with type Dynamic connector

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("AddingNewShape.vsdx");
// set sub shape ids
shapeFromId = 2;
shapeToId = 4;
// access a particular page
page = diagram.getPages().getPage("Page-3");
// initialize connector shape
shape = new aspose.diagram.Shape();
shape.getLine().getEndArrow().setValue(4);
shape.getLine().getLineWeight().setValue(0.01388);
// add shape
connecter1Id = page.addShape(shape, "Dynamic connector");
// connect sub-shapes
page.connectShapesViaConnector(
shapeFromId,
aspose.diagram.ConnectionPointPlace.RIGHT,
shapeToId,
aspose.diagram.ConnectionPointPlace.LEFT,
connecter1Id);
diagram.save("out-ConnectVisioSubShapes.vsdx", aspose.diagram.SaveFileFormat.VSDX);

connectShapesViaConnector(shapeFromId, fromConnectionName, shapeToId, toConnectionName, connectorId)

Connect shapes via connector.

ParameterTypeDescription
shapeFromIdlongThe ID of shape where the connector begins
fromConnectionNameStringThe connection name on the first shape where connector will be connected .
shapeToIdlongThe ID of shape where the connector ends
toConnectionNameStringThe connection name on the second shape where connector will be connected .
connectorIdlongThe ID of shape with type Dynamic connector

connectShapesViaConnectorIndex(shapeFromId, fromIndex, shapeToId, toIndex, connectorId)

Connect shapes via connector index.

ParameterTypeDescription
shapeFromIdlongThe ID of shape where the connector begins
fromIndexNumberThe index of the connection on the first shape
shapeToIdlongThe ID of shape where the connector ends
toIndexNumberhe index of the connection on the second shape
connectorIdlongThe ID of shape with type Dynamic connector

connectShapesViaConnectorIndex(shapeFrom, fromIndex, shapeTo, toIndex, connector)

Connect shapes via connector index.

ParameterTypeDescription
shapeFromShapeThe shape where the connector begins
fromIndexNumberThe index of the connection on the first shape
shapeToShapeThe shape where the connector ends
toIndexNumberhe index of the connection on the second shape
connectorShapeThe shape with type Dynamic connector

constructor_overload$1()

Constructor.

copy()

dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

drawEllipse(pinX, pinY, width, height)

The process of drawing Ellipse.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the shape
heightNumberSpecifies the height of the shape

Returns: long — long

drawLine(beginX, beginY, endX, endY)

The process of drawing a single line.

ParameterTypeDescription
beginXNumberSpecifies the begin x-coordinate of the shape’s position in relation to the page.
beginYNumberSpecifies the begin y-coordinate of the shape’s position in relation to the page.
endXNumberSpecifies the end x-coordinate of the shape’s position in relation to the page.
endYNumberSpecifies the end y-coordinate of the shape’s position in relation to the page.

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

drawLine(pinX, pinY, width, height, xyArray)

The process of drawing line.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the shape
heightNumberSpecifies the height of the shape
xyArrayArray of NumberAn array of alternating x and y values that defines points in the new shape

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

drawOwal(x1, y1, x2, y2)

The process of drawing owal.

ParameterTypeDescription
x1NumberSpecifies the x-coordinate representing the lower-left corner of the rectangle
y1NumberSpecifies the y-coordinate representing the lower-left corner of the rectangle
x2NumberSpecifies the x-coordinate representing the top-right corner of the rectangle
y2NumberSpecifies the y-coordinate representing the top-right corner of the rectangle

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

drawPolyline(xyArray)

The process of drawing Polyline.

ParameterTypeDescription
xyArrayArray of NumberAn array of alternating x and y values that defines points in the new shape

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

drawPolyline(pinX, pinY, width, height, xyArray)

The process of drawing Polyline.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the shape
heightNumberSpecifies the height of the shape
xyArrayArray of NumberAn array of alternating x and y values that defines points in the new shape

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

drawRectangle(pinX, pinY, width, height)

The process of drawing rectangle.

ParameterTypeDescription
pinXNumberSpecifies the x-coordinate of the shape’s pin (center of rotation) in relation to the page.
pinYNumberSpecifies the y-coordinate of the shape’s pin (center of rotation) in relation to the page.
widthNumberSpecifies the width of the shape
heightNumberSpecifies the height of the shape

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

drawRectangle(x1, y1, x2, y2)

The process of drawing rectangle.

ParameterTypeDescription
x1NumberSpecifies the x-coordinate representing the lower-left corner of the rectangle
y1NumberSpecifies the y-coordinate representing the lower-left corner of the rectangle
x2NumberSpecifies the x-coordinate representing the top-right corner of the rectangle
y2NumberSpecifies the y-coordinate representing the top-right corner of the rectangle

Returns: long — long The unique ID of the shape within shapes collection on the specified page.

dropContainer(targetShape)

The process of creating Container.

ParameterTypeDescription
targetShapeShapetarget shape

Returns: Shape — Shape The shape within shapes collection on the specified page.

getAssociatedPage()

The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.

getBackground()

A flag indicating if the page is a background page. The value of the property is BOOL integer constant.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("RetrievePageInfo.vdx");
for (var it = diagram.getPages().iterator(); it.hasNext();) {
page = it.next();
// Checks if current page is a background page
if (page.getBackground() == aspose.diagram.BOOL.TRUE) {
// Display information about the background page
console.log("Background Page ID : " + page.getID());
console.log("Background Page Name : " + page.getName());
} else {
// Display information about the foreground page
console.log("\nPage ID : " + page.getID());
console.log("Universal Name : " + page.getNameU());
console.log("ID of the Background Page : " + page.getBackPage());
}
}

getBackPage()

The page’s background page.

getConnects()

Contains a Connect element for each connection between two shapes in a drawing.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("RetrieveConnectorInfo.vsd");
connects = diagram.getPages().getPage(0).getConnects();
for (var it = connects.iterator(); it.hasNext();) {
connector = it.next();
// Display information about the Connectors
console.log("From Shape ID : " + connector.getFromSheet());
console.log("To Shape ID : " + connector.getToSheet());
}

getID()

The unique ID of the element within its parent element.

getName()

The name of the element.

getNameU()

The universal name of the element.

getPages()

Page collection.

getPageSheet()

Contains elements that define the page sheet for a Page or Master element.

getReviewerID()

The ID of the reviewer associated with the markup overlay.

getShapes()

Shape collection.

getViewCenterX()

ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.

getViewCenterY()

ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.

getViewScale()

The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150%, and so on.

glueShapes(shapeFrom, placeTo, shapeTo)

Glue shapes.

ParameterTypeDescription
shapeFromShapeThe shape which is glue from
placeToNumberConnectionPointPlace
shapeToShapeThe shape where to glue to

glueShapes(shapeFromId, placeTo, shapeToId)

Glue shapes

ParameterTypeDescription
shapeFromIdlongThe ID of shape which is glue from
placeToNumberConnectionPointPlace
shapeToIdlongThe ID of shape where to glue to

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("GlueVisioShapes.vsdx");
// Get a particular page
page = diagram.getPages().getPage("Page-1");
// set shape id
shape1_ID = 7;
shape2_ID = 494;
// Glue shapes
page.glueShapes(shape1_ID, aspose.diagram.ConnectionPointPlace.CENTER, shape2_ID);
diagram.save("out-GlueVisioShapes.vsdx", aspose.diagram.SaveFileFormat.VSDX);

glueShapesInContainer(shapeFromId, shapeToBeginConnectionName, shapeToEndConnectionName, shapeToId)

Glue shapes in container using connection name

ParameterTypeDescription
shapeFromIdlongThe ID of shape which is glue from
shapeToBeginConnectionNameStringThe location on the first connection name where to glue .
shapeToEndConnectionNameStringThe location on the end connection name where to glue .
shapeToIdlongThe ID of shape where to glue to

glueShapesInContainer(shapeFromId, shapeToBeginConnectionIndex, shapeToEndConnectionIndex, shapeToId)

Glue shapes in container

ParameterTypeDescription
shapeFromIdlongThe ID of shape which is glue from
shapeToBeginConnectionIndexNumberThe location on the first connection index where to glue .
shapeToEndConnectionIndexNumberThe location on the end connection index where to glue .
shapeToIdlongThe ID of shape where to glue to

glueShapesInContainerByID(shapeFromId, shapeToBeginConnectionID, shapeToEndConnectionID, shapeToId)

Glue shapes by connection id in container

ParameterTypeDescription
shapeFromIdlongThe ID of shape which is glue from
shapeToBeginConnectionIDNumberThe location on the first connection id where to glue .
shapeToEndConnectionIDNumberThe location on the end connection id where to glue .
shapeToIdlongThe ID of shape where to glue to

glueShapeToConnectorBeginX(shapeFromId, connectionName, connectorId)

Glue shape to Connector’s BeginX

ParameterTypeDescription
shapeFromIdlongThe ID of shape where the connector begins
connectionNameStringThe connection name on the shape where connector will be connected .
connectorIdlongThe ID of shape with type Dynamic connector

glueShapeToConnectorEndX(shapeToId, connectionName, connectorId)

Glue shape to Connector’s EndX

ParameterTypeDescription
shapeToIdlongThe ID of shape where the connector ends
connectionNameStringThe connection name on the second shape where connector will be connected .
connectorIdlongThe ID of shape with type Dynamic connector

layout(options)

Lays out the shapes and/or reroutes the connectors for the page.

ParameterTypeDescription
optionsLayoutOptionsUsing the

moveTo(index)

Moves the page to another location in the pages.

ParameterTypeDescription
indexNumberDestination page index.

sendBackward(shapeId)

Moves a shape,defined by ID, back one position in the z-order.

ParameterTypeDescription
shapeIdlongID of shape.

sendToBack(shapeId)

Moves a shape,defined by ID, to the back of the z-order.

ParameterTypeDescription
shapeIdlongID of shape.

setAssociatedPage()

The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing.

setBackground()

A flag indicating if the page is a background page. The value of the property is BOOL integer constant.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("RetrievePageInfo.vdx");
for (var it = diagram.getPages().iterator(); it.hasNext();) {
page = it.next();
// Checks if current page is a background page
if (page.getBackground() == aspose.diagram.BOOL.TRUE) {
// Display information about the background page
console.log("Background Page ID : " + page.getID());
console.log("Background Page Name : " + page.getName());
} else {
// Display information about the foreground page
console.log("\nPage ID : " + page.getID());
console.log("Universal Name : " + page.getNameU());
console.log("ID of the Background Page : " + page.getBackPage());
}
}

setBackPage()

The page’s background page.

setID()

The unique ID of the element within its parent element.

setName()

The name of the element.

setNameU()

The universal name of the element.

setPages()

Page collection.

setPresetTheme()

Apply a preset theme to this page The value of the property is PresetThemeValue integer constant.

setPresetThemeQuickStyle()

Apply a preset theme variant quickstyle to this page The value of the property is PresetQuickStyleValue integer constant.

setPresetThemeVariant()

Apply a preset theme variant to this page The value of the property is PresetThemeVariantValue integer constant.

setReviewerID()

The ID of the reviewer associated with the markup overlay.

setViewCenterX()

ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.

setViewCenterY()

ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially.

setViewScale()

The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150%, and so on.