Adds a new page to the end of the PDF document. Returns a PdfPage object representing the new page.
Appends another PDF file to the current document.
The file instance of the PDF to append. Returns true if append was successful, false otherwise.
Gets or sets the art box of the page.
Gets or sets the bleed box of the page.
Clears the content of the PDF document.
Gets or sets the crop box of the page.
Deletes the page at the specified index.
The index of the page to delete. Returns true if the page was deleted successfully, false otherwise.
Deletes a range of pages starting from the specified index.
The starting index of the pages to delete.
The number of pages to delete. Returns true if the pages were deleted successfully, false otherwise.
Draws another PDF page onto this page.
The PdfPage object representing the page to draw.
The x-coordinate for the drawing position.
The y-coordinate for the drawing position.
The width for the drawing.
The height for the drawing.
The rotation angle for the drawing.
Optional
layerObject: PdfLayerThe layer on which to draw the page (optional).
Draws a dynamic template on the page.
The XML string representing the dynamic template. Returns true if the drawing was successful, false otherwise.
Extracts specified pages from the PDF document and saves them to a new file.
The file instance to save the extracted pages.
An array or list specifying the indices of pages to extract. Returns true if extraction and save were successful, false otherwise.
Extracts the text content from the page.
Whether to extract the text with formatting. Returns the extracted text.
Retrieves the image object at the specified index.
Gets the number of images on the page.
Gets the page at the specified index.
Gets or sets the height of the page.
Inserts a new page at the specified index.
Gets or sets the media box of the page.
Moves a page from one index to another.
The index of the page to move.
The index to move the page to. Returns true if the page was moved successfully, false otherwise.
Optimizes the page by reducing the size of images.
The maximum dimension for images.
The quality of JPEG images.
Whether to optimize images with masks by recompressing them.
Readonly
PageThe number of pages in the PDF document.
Gets or sets the rotation of the page. The rotation is specified in degrees (0, 90, 180, 270).
Saves the page as an image file.
The file instance to save the page as an image.
The width of the image.
The type of the image (e.g., "Jpeg", "Png", "Tiff").
Optional
bgColor: stringThe background color for the image. Returns true if the save was successful, false otherwise.
Saves the page as a PDF file.
The file instance to save the page as a PDF. Returns true if the save was successful, false otherwise.
Swaps the positions of two pages.
The index of the first page.
The index of the second page. Returns true if the pages were swapped successfully, false otherwise.
Gets or sets the trim box of the page.
Gets or sets the width of the page.
Represents a page in a PDF document with various properties and methods.