[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Collapse]Office File API
  Demo Application
  Redistribution and Deployment
 [Expand]Spreadsheet Document API
 [Expand]Word Processing Document API
 [Collapse]PDF Document API
   Getting Started
   Coordinate Systems
   Document Generation
  [Expand]PDF Graphics
  [Collapse]Document Manipulation
    Merging Documents
    Page Manipulation
  [Expand]Additional Content
  [Expand]Interactive Forms
  [Expand]Text Markup Annotations
  [Expand]Document Security
  [Expand]Examples
 [Expand]Excel Export Library
 [Expand]Snap Report API
 [Expand]Zip Compression and Archive API
 [Expand]Barcode Generation API
 [Expand]Unit Conversion API
 [Expand]API Reference
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Page Manipulation

The topic describes the following page manipulation capabilities:

Expanded Copy pages from one document to another PDF

To copy pages:

Example

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T581087.

This example shows how to copy a page from one PDF document to another PDF.

Expanded Add/Insert a new page into a document

To add a new page to the end of a document, call the PdfDocumentProcessor.AddNewPage method with the specified page size, as shown below.

To insert a new page into a document, call the PdfDocumentProcessor.InsertNewPage method with the page number where the new page should be inserted and the page size.

To save the resulting document, call the PdfDocumentProcessor.SaveDocument overload method.

The following code shows how to add a new page to a document:

The graphics content (for example, an image or string) can be added to an existing page's foreground/background by calling the PdfGraphics.AddToPageForeground or PdfGraphics.AddToPageBackground overload method.

The PDF graphics is represented by an instance of the PdfGraphics class. To access this class, you need to reference the DevExpress.Pdf.Drawing assembly. See the Adding Graphics Content to a Page topic to learn more.

Expanded Render a new page with graphics

The PdfDocumentProcessor class contains the PdfDocumentProcessor.RenderNewPage overload methods that render a new page with graphics content.

See the PDF Graphics section to learn more about PDF Graphics.

Expanded Delete a page from a document

To delete a particular page from a document, call the PdfDocumentProcessor.DeletePage method with the number of the page that should be deleted.

Example

This example shows how to delete odd-numbered pages in the document, starting from the last odd-numbered page.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T114310.

Expanded Rotate a page in a document

To rotate a page at a specified angle:

Example

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T114305.

This example illustrates how to use the PDF Document API component for rotating pages.

Is this topic helpful?​​​​​​​