



Collapse All
Syntax| LONG PageNumber { get; } |
RemarksThe PageNumber property returns the current index of the active page in a PDF document.
Equivalent in new interface: IPDFDocument4::CurrentPage.
Example{ 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;
// 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();
// 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();
' 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