PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis method creates a new PDF page.
|
| HRESULT NewPage () |
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
This method creates a new page in a PDF document and sets the current page to a new value. The first page of the PDF document is created automatically after the BeginDoc method is called. The first call of the NewPage method creates a second page.
Equivalents in new interface: IPDFDocument4::NewPage, IPDFDocument4::AddPage.
Example
Adding a New Page to a Document
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetActiveFont('Verdana', False, True, False, False, 16.0, 0);
PDF.PDFPAGE_TextOut(20, 20, 0.0, 'Page 1');
PDF.NewPage;
PDF.PDFPAGE_SetActiveFont('Arial', True, False, False, False, 16.0, 0);
PDF.PDFPAGE_TextOut(20, 20, 0.0, 'Page 2');
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_SetActiveFont("Verdana", FALSE, TRUE, FALSE, FALSE, 16.0, 0)
PDF->PDFPAGE_TextOut(20, 20, 0.0, "Page 1");
PDF->NewPage();
PDF->PDFPAGE_SetActiveFont("Arial", TRUE, FALSE, FALSE, FALSE, 16.0, 0)
PDF->PDFPAGE_TextOut(20, 20, 0.0, "Page 2");
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_SetActiveFont("Verdana", false, true, false, false, 16.0, 0)
PDF.PDFPAGE_TextOut(20, 20, 0.0, "Page 1");
PDF.NewPage();
PDF.PDFPAGE_SetActiveFont("Arial", true, false, false, false, 16.0, 0)
PDF.PDFPAGE_TextOut(20, 20, 0.0, "Page 2");
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc PDF.PDFPAGE_SetActiveFont "Verdana", False, True, False, False, 16.0, 0 PDF.PDFPAGE_TextOut 20, 20, 0.0, "Page 1" PDF.NewPage PDF.PDFPAGE_SetActiveFont "Arial", True, False, False, False, 16.0, 0 PDF.PDFPAGE_TextOut 20, 20, 0.0, "Page 2" PDF.EndDoc
See Also
Reference


