PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllGets the number of an active PDF page.
|
| LONG PageNumber { get; } |
Value
Number of an active PDF page.
Remarks
The PageNumber property returns the current active page index in a PDF document.
Example
Set current page of PDF document
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.NewPage;
PDF.NewPage;
for i := 0 to PDF.PageCount-1 do
begin
PDF.SetCurrentPage(i);
PDF.PDFPAGE_SetActiveFont('Verdana', False, False, False, False, 8.0, 0);
PDF.PDFPAGE_TextOut(100, 100, 0.0, 'Page ' + IntToStr(PDF.PageNumber + 1));
end;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->NewPage();
PDF->NewPage();
for (LONG i = 0; i < PDF.PageCount; i++)
{
PDF->SetCurrentPage(i);
PDF->PDFPAGE_SetActiveFont("Verdana", FALSE, FALSE, FALSE, FALSE, 8.0, 0);
CString str;
str->Format("Page %d", PDF->PageNumber + 1);
PDF->PDFPAGE_TextOut(100, 100, 0.0, str);
}
PDF.EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.NewPage();
PDF.NewPage();
for (long i = 0; i < PDF.PageCount; i++)
{
PDF.SetCurrentPage(i);
PDF.PDFPAGE_SetActiveFont("Verdana", FALSE, FALSE, FALSE, FALSE, 8, 0);
string str = "Page " + (PDF.PageNumber + 1).ToString();
PDF.PDFPAGE_TextOut(100, 100, 0, str);
}
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.NewPage
PDF.NewPage
for i=0 to PDF.PageCount-1
PDF.SetCurrentPage i
PDF.PDFPAGE_SetActiveFont "Verdana", FALSE, FALSE, FALSE, FALSE, 8, 0
PDF.PDFPAGE_TextOut 100, 100, 0, "Page " & (PDF.PageNumber + 1)
next
PDF.EndDoc
See Also
Reference


