asposediagram.api

Class PageSheet

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

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");

srcVisio = new aspose.diagram.Diagram("AddingNewShape.vsdx");

// initialize a new Visio
newDiagram = new aspose.diagram.Diagram();

// add all masters from the source Visio diagram
originalMasters = srcVisio.getMasters();
for (it = originalMasters.iterator(); it.hasNext();) {
    master = it.next();
    newDiagram.addMaster(srcVisio, master.getName());
}

// get the page object from the original diagram
SrcPage = srcVisio.getPages().getPage("Page-1");
// copy themes from the source diagram
newDiagram.copyTheme(srcVisio);
// copy pagesheet of the source Visio page
newDiagram.getPages().get(0).getPageSheet().copy(SrcPage.getPageSheet());

// copy shapes from the source Visio page
for (it = SrcPage.getShapes().iterator(); it.hasNext();) {
    shape = it.next();
    newDiagram.getPages().get(0).getShapes().add(shape);
}

newDiagram.save("out-CopyShapes.vsdx", aspose.diagram.SaveFileFormat.VSDX);

Property Getters/Setters Summary
methodgetActs()
Contains a collection of Act elements.
methodgetAnnotations()
Contains elements that contain information about comments inserted into a document page.
methodgetConnectionABCDs()
Contains a collection of ConnectionABCD elements.
methodgetConnections()
Contains a collection of Connection elements.
methodgetFillStyle()
method
           StyleSheet element from which the PageSheet inherits fill formatting.
methodgetForeign()
Contains elements specifying the width and height of an object from another program used in a Microsoft Visio document. Also includes elements specifying the distance the object's image is offset within its borders.
methodgetForeignData()
Contains a MIME (Multipurpose Internet Mail Extensions) encoded BLOB of picture data, such as Windows metafile, bitmap, or OLE data.
methodgetHyperlinks()
Contains a collection of Hyperlink elements.
methodgetLayers()
Contains a collection of Layer elements.
methodgetLineStyle()
method
           StyleSheet element from which the PageSheet inherits line formatting.
methodgetPageLayout()
Contains Diagram that control the page layout settings for shapes and connectors, such as spacing between all shapes on the page, spacing between all connectors on the page, and routing style for all connectors on the page.
methodgetPageProps()
Contains Diagram that control page attributes, such as the page width, height, and scale.
methodgetPrintProps()
Contains elements that control how the drawing page is formatted (appears) on the printer page.
methodgetProps()
Contains a collection of Prop elements.
methodgetRulerGrid()
Contains elements that specify the settings of the page's rulers and grid.
methodgetScratchs()
Contains a collection of Scratch elements.
methodgetSmartTagDefs()
Contains a collection of SmartTagDef elements.
methodgetTextStyle()
method
           StyleSheet element from which the PageSheet inherits text formatting.
methodgetUniqueID()
A GUID (globally unique identifier) for the element.
methodgetUsers()
Contains a collection of User elements.
methodgetXForm()
Contains elements specifying general positioning information about a shape.
 
Method Summary
methodcopy(source)
Copies pagesheet from a source object.
 

    • Property Getters/Setters Detail

      • getLineStyle/setLineStyle : StyleSheet 

        StyleSheet getLineStyle() / setLineStyle(value)
        
        StyleSheet element from which the PageSheet inherits line formatting.
      • getFillStyle/setFillStyle : StyleSheet 

        StyleSheet getFillStyle() / setFillStyle(value)
        
        StyleSheet element from which the PageSheet inherits fill formatting.
      • getTextStyle/setTextStyle : StyleSheet 

        StyleSheet getTextStyle() / setTextStyle(value)
        
        StyleSheet element from which the PageSheet inherits text formatting.
      • getUniqueID : UUID 

        UUID getUniqueID()
        
        A GUID (globally unique identifier) for the element.
      • getXForm : XForm 

        XForm getXForm()
        
        Contains elements specifying general positioning information about a shape.
      • getPageProps : PageProps 

        PageProps getPageProps()
        
        Contains Diagram that control page attributes, such as the page width, height, and scale.
      • getRulerGrid : RulerGrid 

        RulerGrid getRulerGrid()
        
        Contains elements that specify the settings of the page's rulers and grid.
      • getPageLayout : PageLayout 

        PageLayout getPageLayout()
        
        Contains Diagram that control the page layout settings for shapes and connectors, such as spacing between all shapes on the page, spacing between all connectors on the page, and routing style for all connectors on the page.
      • getPrintProps : PrintProps 

        PrintProps getPrintProps()
        
        Contains elements that control how the drawing page is formatted (appears) on the printer page.
      • getLayers : LayerCollection 

        LayerCollection getLayers()
        
        Contains a collection of Layer elements.

        Example:

        var aspose = aspose || {};
        aspose.diagram = require("aspose.diagram");
        
        diagram = new aspose.diagram.Diagram("Layers.vsdx");
        // get Visio page
        page = diagram.getPages().getPage("Page-1");
        layers = page.getPageSheet().getLayers();
        // iterate through the layers
        for (var it = layers.iterator(); it.hasNext();) {
            layer = it.next();
            console.log("Name: " + layer.getName().getValue());
            console.log("Visibility: " + layer.getVisible().getValue());
            console.log("Status: " + layer.getStatus().getValue());
        }
      • getAnnotations : AnnotationCollection 

        AnnotationCollection getAnnotations()
        
        Contains elements that contain information about comments inserted into a document page.

        Example:

        var aspose = aspose || {};
        aspose.diagram = require("aspose.diagram");
        
        var diagram = new aspose.diagram.Diagram("Drawing1.vsdx");
        // get collection of the annotations
        annotations = diagram.getPages().getPage("Page-1").getPageSheet().getAnnotations();
        for (var it = annotations.iterator(); it.hasNext();) {
            annotation = it.next();
            var comment = annotation.getComment().getValue();
            comment += "Updation mark";
            annotation.getComment().setValue(comment);
        }
        diagram.save("out-EditPageLevelCommentInVisio.vsdx", aspose.diagram.SaveFileFormat.VSDX);
      • getForeign : Foreign 

        Foreign getForeign()
        
        Contains elements specifying the width and height of an object from another program used in a Microsoft Visio document. Also includes elements specifying the distance the object's image is offset within its borders.
      • getForeignData : ForeignData 

        ForeignData getForeignData()
        
        Contains a MIME (Multipurpose Internet Mail Extensions) encoded BLOB of picture data, such as Windows metafile, bitmap, or OLE data.
    • Method Detail

      • copy

         copy(source)
        Copies pagesheet from a source object.
        Parameters:
        source: PageSheet - source pagesheet.