menu

Document Processing

PageSetupImpl Class - C# Excel Library API Reference | Syncfusion

    Show / Hide Table of Contents

    PageSetupImpl Class

    This Class allows the user to configure Print settings of a document.

    Inheritance
    System.Object
    CommonObject
    PageSetupBaseImpl
    PageSetupImpl
    Implements
    System.IDisposable
    IPageSetup
    IPageSetupBase
    IParentApplication
    Inherited Members
    CommonObject.AddReference()
    CommonObject.AppImplementation
    CommonObject.Application
    CommonObject.CheckDisposed()
    CommonObject.Finalize()
    CommonObject.FindParent(Object, Type)
    CommonObject.FindParent(Object, Type, Boolean)
    CommonObject.FindParent(Type)
    CommonObject.FindParent(Type, Boolean)
    CommonObject.FindParent(Type[])
    CommonObject.FindParents(Type[])
    CommonObject.m_bIsDisposed
    CommonObject.OnDispose()
    CommonObject.Parent
    CommonObject.ReferenceCount
    CommonObject.ReleaseReference()
    CommonObject.SetParent(Object)
    PageSetupBaseImpl.AlignHFWithPageMargins
    PageSetupBaseImpl.AutoFirstPageNumber
    PageSetupBaseImpl.BackgoundImage
    PageSetupBaseImpl.BlackAndWhite
    PageSetupBaseImpl.BottomMargin
    PageSetupBaseImpl.CenterFooter
    PageSetupBaseImpl.CenterFooterImage
    PageSetupBaseImpl.CenterHeader
    PageSetupBaseImpl.CenterHeaderImage
    PageSetupBaseImpl.CenterHorizontally
    PageSetupBaseImpl.CenterVertically
    PageSetupBaseImpl.Copies
    PageSetupBaseImpl.CreateHeaderFooterString(String[])
    PageSetupBaseImpl.DEFAULT_BOTTOMMARGIN
    PageSetupBaseImpl.DEFAULT_LEFTMARGIN
    PageSetupBaseImpl.DEFAULT_RIGHTMARGIN
    PageSetupBaseImpl.DEFAULT_TOPMARGIN
    PageSetupBaseImpl.DifferentFirstPageHF
    PageSetupBaseImpl.DifferentOddAndEvenPagesHF
    PageSetupBaseImpl.Draft
    PageSetupBaseImpl.EvenPage
    PageSetupBaseImpl.FirstPage
    PageSetupBaseImpl.FirstPageNumber
    PageSetupBaseImpl.FitToPagesTall
    PageSetupBaseImpl.FitToPagesWide
    PageSetupBaseImpl.FooterMargin
    PageSetupBaseImpl.FullFooterString
    PageSetupBaseImpl.FullHeaderString
    PageSetupBaseImpl.GetRecordUpdatePos(IList, Int32)
    PageSetupBaseImpl.HeaderMargin
    PageSetupBaseImpl.HFScaleWithDoc
    PageSetupBaseImpl.HResolution
    PageSetupBaseImpl.IsNotValidSettings
    PageSetupBaseImpl.LeftFooter
    PageSetupBaseImpl.LeftFooterImage
    PageSetupBaseImpl.LeftHeader
    PageSetupBaseImpl.LeftHeaderImage
    PageSetupBaseImpl.LeftMargin
    PageSetupBaseImpl.m_arrFooters
    PageSetupBaseImpl.m_arrHeaders
    PageSetupBaseImpl.m_backgroundImage
    PageSetupBaseImpl.m_bHCenter
    PageSetupBaseImpl.m_bVCenter
    PageSetupBaseImpl.m_dBottomMargin
    PageSetupBaseImpl.m_dLeftMargin
    PageSetupBaseImpl.m_dRightMargin
    PageSetupBaseImpl.m_dTopMargin
    PageSetupBaseImpl.m_headerFooter
    PageSetupBaseImpl.m_setup
    PageSetupBaseImpl.m_unknown
    PageSetupBaseImpl.NeedDataArray
    PageSetupBaseImpl.Order
    PageSetupBaseImpl.Orientation
    PageSetupBaseImpl.PageHeight
    PageSetupBaseImpl.PageWidth
    PageSetupBaseImpl.PaperSize
    PageSetupBaseImpl.ParseHeaderFooterString(String)
    PageSetupBaseImpl.PrintComments
    PageSetupBaseImpl.PrintErrors
    PageSetupBaseImpl.PrintNotes
    PageSetupBaseImpl.PrintQuality
    PageSetupBaseImpl.RecordCode
    PageSetupBaseImpl.RightFooter
    PageSetupBaseImpl.RightFooterImage
    PageSetupBaseImpl.RightHeader
    PageSetupBaseImpl.RightHeaderImage
    PageSetupBaseImpl.RightMargin
    PageSetupBaseImpl.SetChanged()
    PageSetupBaseImpl.StreamPos
    PageSetupBaseImpl.TopMargin
    PageSetupBaseImpl.TypeCode
    PageSetupBaseImpl.VResolution
    PageSetupBaseImpl.Zoom
    Namespace: Syncfusion.XlsIO.Implementation
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    public class PageSetupImpl : PageSetupBaseImpl, IDisposable, IBiffStorage, IPageSetup, IPageSetupBase, IParentApplication

    Constructors

    PageSetupImpl(IApplication, Object)

    Sets application and parent fields.

    Declaration
    public PageSetupImpl(IApplication application, object parent)
    Parameters
    Type Name Description
    IApplication application

    Application object for the page setup.

    System.Object parent

    Parent object for the page setup.

    Properties

    DefaultRowHeight

    Gets / sets default row height.

    Declaration
    public int DefaultRowHeight { get; set; }
    Property Value
    Type
    System.Int32

    DefaultRowHeightFlag

    Gets / sets default row height option flag.

    Declaration
    public bool DefaultRowHeightFlag { get; set; }
    Property Value
    Type
    System.Boolean

    HPageBreaks

    Gets horizontal page break.

    Declaration
    public HPageBreaksCollection HPageBreaks { get; }
    Property Value
    Type
    Syncfusion.XlsIO.Implementation.Collections.HPageBreaksCollection

    IsFitToPage

    Indicates whether fit to page mode is selected.

    Declaration
    public override bool IsFitToPage { get; set; }
    Property Value
    Type
    System.Boolean
    Overrides
    PageSetupBaseImpl.IsFitToPage

    IsSummaryColumnRight

    Indicates whether summary columns will appear right of the detail in outlines.

    Declaration
    public bool IsSummaryColumnRight { get; set; }
    Property Value
    Type
    System.Boolean

    IsSummaryRowBelow

    Indicates whether summary rows will appear below detail in outlines.

    Declaration
    public bool IsSummaryRowBelow { get; set; }
    Property Value
    Type
    System.Boolean

    PrintArea

    Returns or sets the range to be printed, as a string using A1-style references in the language of the macro. Read/write String.

    Declaration
    public string PrintArea { get; set; }
    Property Value
    Type
    System.String

    PrintGridlines

    True if cell gridlines are printed on the page. Applies only to worksheets. Read/write Boolean.

    Declaration
    public bool PrintGridlines { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    To know more about page settings refer this link.

    Examples

    The following code illustrates the use of PrintGridlines property.

          using (ExcelEngine excelEngine = new ExcelEngine())
          {
            //Create a worksheet.        
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet sheet = workbook.Worksheets[0];
            sheet.Range["A1:M20"].Text = "PagePrint";
            sheet.Range["A1:M1"].Text = "Page";
            sheet.Range["C1:C20"].Text = "Page";
    
            //True to cell gridlines are printed on the page
            sheet.PageSetup.PrintGridlines = true;
    
            workbook.SaveAs("PageSetup.xlsx");
            workbook.Close();
          }

    PrintHeadings

    True if row and column headings are printed with this page. Applies only to worksheets. Read/write Boolean.

    Declaration
    public bool PrintHeadings { get; set; }
    Property Value
    Type
    System.Boolean

    PrintTitleColumns

    Returns or sets the columns that contain the cells to be repeated on the left side of each page, as a string in A1-style notation in the language of the macro. Read/write String.

    Declaration
    public string PrintTitleColumns { get; set; }
    Property Value
    Type
    System.String

    PrintTitleRows

    Returns or sets the rows that contain the cells to be repeated at the top of each page, as a string in A1-style notation in the language of the macro. Read/write String.

    Declaration
    public string PrintTitleRows { get; set; }
    Property Value
    Type
    System.String

    RelationId

    Gets / sets relation id to the printer settings part.

    Declaration
    public string RelationId { get; set; }
    Property Value
    Type
    System.String

    VPageBreaks

    Gets vertical page break.

    Declaration
    public VPageBreaksCollection VPageBreaks { get; }
    Property Value
    Type
    Syncfusion.XlsIO.Implementation.Collections.VPageBreaksCollection

    Worksheet

    Returns parent worksheet. Read-only.

    Declaration
    public WorksheetImpl Worksheet { get; }
    Property Value
    Type
    WorksheetImpl

    Methods

    Clone(Object)

    Creates copy of the current instance.

    Declaration
    public PageSetupImpl Clone(object parent)
    Parameters
    Type Name Description
    System.Object parent

    Parent for the new instance.

    Returns
    Type Description
    PageSetupImpl

    A clone of the current instance.

    ConvertTo3dRangeName(String)

    Converts cell range to 3d Range name.

    Declaration
    protected string ConvertTo3dRangeName(string value)
    Parameters
    Type Name Description
    System.String value

    cell range.

    Returns
    Type Description
    System.String

    3d range name.

    Dispose()

    Dispose Page Setup

    Declaration
    public override void Dispose()
    Overrides
    PageSetupBaseImpl.Dispose()

    ExtractPrintArea()

    Extracts print area string.

    Declaration
    protected string ExtractPrintArea()
    Returns
    Type Description
    System.String

    Print area string.

    ExtractPrintTitleRowColumn(Boolean)

    Extracts row or column print title from default title named range.

    Declaration
    protected string ExtractPrintTitleRowColumn(bool bRowExtract)
    Parameters
    Type Name Description
    System.Boolean bRowExtract

    Defines which print title must be extracted.

    Returns
    Type Description
    System.String

    Row/column print title string.

    FillGutsRecord()

    Fills internal guts record with information from Rows and ColumnInfo records.

    Declaration
    protected void FillGutsRecord()

    FindParents()

    Find parent worksheet.

    Declaration
    protected override void FindParents()
    Overrides
    PageSetupBaseImpl.FindParents()
    Exceptions
    Type Condition
    System.ArgumentException

    When can't find parent worksheet.

    GetStoreSize(ExcelVersion)

    Size of the required storage space. Read-only.

    Declaration
    public override int GetStoreSize(ExcelVersion version)
    Parameters
    Type Name Description
    ExcelVersion version

    Represents Excel version.

    Returns
    Type
    System.Int32
    Overrides
    PageSetupBaseImpl.GetStoreSize(ExcelVersion)

    ParsePrintAreaExpression(String)

    Parses print area expression.

    Declaration
    protected void ParsePrintAreaExpression(string value)
    Parameters
    Type Name Description
    System.String value

    Value representing print area.

    ParsePrintTitleColumns(String)

    Parses column print title string and makes appropriate changes to default title named range.

    Declaration
    protected void ParsePrintTitleColumns(string value)
    Parameters
    Type Name Description
    System.String value

    Column print title string to set.

    ParsePrintTitleRows(String)

    Parses row print title string and makes appropriate changes to default title named range.

    Declaration
    protected void ParsePrintTitleRows(string value)
    Parameters
    Type Name Description
    System.String value

    Row print title string to set.

    Implements

    System.IDisposable
    IPageSetup
    IPageSetupBase
    IParentApplication
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved