PageInfo Class

Represents page setup data which is present in MPP file format and used for printing.
Inheritance Hierarchy
SystemObject
  Aspose.Tasks.VisualizationPageInfo

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

The PageInfo type exposes the following members.

Constructors
  NameDescription
Public methodCode examplePageInfo
Initializes a new instance of the PageInfo class. Represents page setup data which is present in MPP file format and used for printing.
Properties
  NameDescription
Public propertyCode exampleFooter
Gets or sets an instance of the HeaderFooterInfo class which represents a footer data.
Public propertyCode exampleHeader
Gets or sets the instance of the HeaderFooterInfo class which represents a header data.
Public propertyCode exampleLegend
Gets or sets an instance of the PageLegend class which specifies page legend.
Public propertyCode exampleMargins
Gets an instance of the PageMargins class which specifies page margins.
Public propertyCode exampleName
Gets the name of the view for which set-up data is used.
Public propertyCode examplePageSettings
Gets an instance of the PageSettings class which specifies page printing settings.
Public propertyCode examplePageViewSettings
Gets an instance of the PageViewSettings class which specifies page view printing settings.
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 info of MS Project view.
var project = new Project(DataDir + "Project2.mpp");

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

Console.WriteLine("Modify Page Info: " + info.Name);

// lets modify margins
info.Margins.Left = 10d;
info.Margins.Top = 10d;
info.Margins.Right = 10d;
info.Margins.Bottom = 10d;

// lets modify page settings
info.PageSettings.IsPortrait = true;
info.PageSettings.PaperSize = PrinterPaperSize.PaperA4;

// lets modify page view settings
// set a value indicating whether to print notes.
info.PageViewSettings.PrintNotes = true;

var header = new HeaderFooterInfo
{
    LeftText = "Left header text",
    CenteredText = "Centered header text",
    RightText = "Right header text"
};
var legend = new PageLegend
{
    LeftText =  "Left legend text",
    CenteredText = "Centered legend text",
    RightText = "Right legend text"
};
var footer = new HeaderFooterInfo
{
    LeftText = "Left footer text",
    CenteredText = "Centered footer text",
    RightText = "Right footer text"
};

info.Header = header;
info.Legend = legend;
info.Footer = footer;

// work with project...
See Also