PageMargins Class

Represents page margins for printing.
Inheritance Hierarchy
SystemObject
  Aspose.Tasks.VisualizationPageMargins

Namespace:  Aspose.Tasks.Visualization
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public class PageMargins

The PageMargins type exposes the following members.

Constructors
  NameDescription
Public methodPageMargins
Initializes a new instance of the PageMargins class
Properties
  NameDescription
Public propertyCode exampleBorders
Gets or sets a position where to print borders. Can be one of the values of the Border enumeration.
Public propertyCode exampleBottom
Gets or sets the size of the bottom margin in inches or centimeters.
Public propertyCode exampleLeft
Gets or sets the size of the left margin in inches or centimeters.
Public propertyCode exampleRight
Gets or sets the size of the right margin in inches or centimeters.
Public propertyCode exampleTop
Gets or sets the size of the top margin in inches or centimeters.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
Shows how to work with page margins.
var project = new Project(DataDir + "Project2.mpp");

// lets modify the default view
var margins = project.DefaultView.PageInfo.Margins;

// lets modify margins
margins.Left = 10d;
margins.Top = 10d;
margins.Right = 10d;
margins.Bottom = 10d;
margins.Borders = Border.OutsidePages;

project.Save(OutDir + "WorkWithPageMargins_out.mpp", SaveFileFormat.MPP);
See Also