PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis method returns the index of the current page.
|
| LONG GetCurrentPageIndex () |
Return value
Index of the current page
Remarks
The GetCurrentPageIndex method returns the index of the active page of the PDF document. This index can be used in the SetCurrentPage method.
Equivalent in new interface: IPDFDocument4::CurrentPage.
Example
GetCurrentPageIndex Example
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc; { 1st page is created, index = 0 }
PDF.NewPage; { add 2nd page, index = 1 }
PDF.NewPage; { add 3rd page, index = 2 }
i := PDF.GetCurrentPageIndex;
{ now i must be equal to 2 }
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created PDF->BeginDoc; // 1st page is created, index = 0 PDF->NewPage(); // add 2nd page, index = 1 PDF->NewPage(); // add 3rd page, index = 2 LONG i = PDF.GetCurrentPageIndex(); // now i must be equal to 2 PDF.EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created PDF.BeginDoc(); // 1st page is created, index = 0 PDF.NewPage(); // add 2nd page, index = 1 PDF.NewPage(); // add 3rd page, index = 2 long i = PDF.GetCurrentPageIndex(); // now i must be equal to 2 PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc ' 1st page is created, index = 0 PDF.NewPage ' add 2nd page, index = 1 PDF.NewPage ' add 3rd page, index = 2 i = PDF.GetCurrentPageIndex ' now i must be equal to 2 PDF.EndDoc
See Also
Reference


