ComponentOne PDF for .NET
CurrentPage Property

C1.C1Pdf.4 Assembly > C1.C1Pdf Namespace > C1PdfDocument Class : CurrentPage Property
Gets or sets the index of the current page within the document.
Syntax
'Declaration
 
Public Overrides Property CurrentPage As System.Integer
public override System.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

Reference

C1PdfDocument Class
C1PdfDocument Members