PdfDocumentProcessor.AddNewPage(PdfRectangle) Method
Adds an empty page to the document. Accepts page size as a parameter.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v24.2.dll
NuGet Package: DevExpress.Document.Processor
#Declaration
public PdfPage AddNewPage(
PdfRectangle mediaBox
)
#Parameters
Name | Type | Description |
---|---|---|
media |
Pdf |
A Pdf |
#Returns
Type | Description |
---|---|
Pdf |
A Pdf |
#Remarks
The AddNewPage method creates an empty page. Use the PdfDocumentProcessor.RenderNewPage method to create a new page with graphics.
#Example
The following code adds a new page to a document:
using DevExpress.Pdf;
using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
processor.LoadDocument("..\\..\\Document.pdf");
processor.AddNewPage(PdfPaperSize.A4);
processor.SaveDocument("..\\..\\Result.pdf");
}