PdfDocumentProcessor.AddNewPage(PdfRectangle) Method
Adds an empty page to the document. Accepts page size as a parameter.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v23.1.dll
NuGet Package: DevExpress.Document.Processor
Declaration
Parameters
Name | Type | Description |
---|---|---|
mediaBox | PdfRectangle | A PdfRectangle object that is the actual page size. |
Returns
Type | Description |
---|---|
PdfPage | A PdfPage object that is the added page. |
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");
}
See Also