PdfEditor

public final class PdfEditor

Provides specialized editing capabilities for PDF documents. Implements document and page-based editing operations specific to PDF format.

Functions

Link copied to clipboard
public final void addPage()
public final void addPage(float pageWidth, float pageHeight)
Adds a new page to the end of the PDF document.
public final void addPage(int index)
public final void addPage(float pageWidth, float pageHeight, int index)
Adds a new page to the PDF document at the specified index.
Link copied to clipboard
public final void appendDocument(Document document)
Appends all pages from another document to the end of the current PDF document.
Link copied to clipboard
public final void close()
Closes the editor and releases all associated resources.
Link copied to clipboard
public final static PdfEditor edit(Document document)
Creates a new PdfEditor instance and begins editing the specified document.
Link copied to clipboard
public final PdfMetadata getMetadata()
Gets the metadata associated with the current PDF document.
Link copied to clipboard
public final void removePage(int index)
Removes a page from the PDF document at the specified index.
Link copied to clipboard
public final void save()
Saves the current changes made in the editor.
Link copied to clipboard
public final void saveAs(String path)
Saves the current changes to a file at the specified path.
Link copied to clipboard
public final void setCurrentPage(int pageNumber)
Sets the current page in the PDF document.