ComponentOne PDF for .NET
C1.C1Pdf Namespace / C1PdfDocument Class / CurrentPage Property

In This Topic
    CurrentPage Property (C1PdfDocument)
    In This Topic
    Gets or sets the index of the current page within the document.
    Syntax
    'Declaration
     
    
    Public Overrides Property CurrentPage As Integer
    public override int CurrentPage {get; set;}
    Remarks

    The CurrentPage property determines which page of the document should receive the output from the methods that generate content (e.g. DrawString method).

    The value is an integer ranging from -1 (no active page) to C1PdfDocumentBase.Pages. Count - 1.

    You rarely have to use the CurrentPage property while creating a document. When a C1PdfDocument object is created, a blank page is automatically added and becomes the current page, so you can immediately start adding content to it. When the C1PdfDocumentBase.NewPage method is invoked, a new page is added to the document and becomes the current page.

    The CurrentPage property is useful when you want to reopen pages that have already been generated and add content to them (for example, page headers and footers).

    See Also