Overview
The PdfPageSource class represents the page content of an existing PDF file.
Using PdfPageSource
Create an Instance
An instance of the PdfPageSource class can be obtained using the Pages property of PdfFileSource.
Example 1: Obtain an instance of PdfPageSource
Members
PdfPageSource exposes the following properties to give you information about the pages:
- MediaBox: Defines the boundaries of the physical medium on which the page will be printed. Any content falling outside this boundary is discarded without affecting the meaning of the PDF file.
- CropBox: Defines the region to which the contents of the page are clipped (cropped) when displayed or printed. This boundary determines the visible page content. The default value is the page’s media box.
- Size: Property of type Size representing the size of the page. Its value is determined by the width and height of the MediaBox.
- Rotation: Property of type Rotation representing the page rotation.
Example 2 shows how you can use PdfPageSource to merge the pages of several documents into a single one.