Process and Manipulate PDF Files in Java
JPedal is a pure Java PDF library that gives Java developers the ability to process and manipulate PDF files programmatically — including merging, splitting, redacting, digitally signing, sanitizing and optimizing PDF documents.
Merge PDF Files
JPedal can combine multiple PDF files into a single document programmatically in Java.
Split PDF Files
JPedal can split a PDF into individual pages or defined page ranges.
Delete PDF Pages
JPedal can delete Pages from a PDF file, removing all the associated page content as well.
Delete pages from a PDF in Java
Digitally Sign PDF Files
JPedal supports adding digital signatures to PDF files, enabling document authentication and integrity verification workflows.
Sanitize PDF Files
JPedal can sanitize PDF files by removing potentially harmful or unwanted content, including JavaScript, embedded files, and other active content.
Optimize PDF Files
JPedal can reduce PDF file size by removing unused objects, flattening layers and optimizing internal structure.
Manipulate PDF Pages
JPedal supports page-level manipulation including adding, copying, deleting, rotating, redaction, resizing, and n-up imposition.
Frequently Asked Questions
Can JPedal merge PDF files in Java?
Yes. JPedal can combine multiple PDF files into a single document. The merged output preserves the content of all input files including fonts, images, and page structure.
Can JPedal split a PDF into individual pages?
Yes. JPedal can split a PDF into single pages or into documents covering a user-defined page range.
What does PDF redaction do and is it permanent?
Redaction permanently removes content from a PDF so it cannot be recovered — unlike covering text with a black rectangle, which leaves the underlying data intact. JPedal’s redaction removes the content from the PDF structure itself.
Can JPedal redact text matched by a search?
Yes. JPedal’s text search returns page coordinates which can be passed directly to the redaction API. This enables pattern-based redaction workflows — for example, finding and redacting all instances of an account number or name.
Does JPedal support digital signatures?
Yes. JPedal supports adding digital signatures to PDF files. Signatures can be used to verify document authenticity and detect subsequent modifications.
Can JPedal remove JavaScript and active content from a PDF?
Yes. The sanitize function removes JavaScript, embedded files, and other active content that could pose a security risk. This is commonly used in document ingestion pipelines where PDFs are received from untrusted sources.
Can JPedal add, delete or reorder pages?
Yes. JPedal’s page manipulation API supports adding pages, copying pages between documents, deleting pages, rotating pages, resizing pages, and n-up imposition (combining multiple pages onto a single output page).
Can I process PDF files without writing Java code?
Yes. JPedal includes a command-line interface that supports several processing operations: java -jar jpedal.jar --inspect "inputFile.pdf". See the individual tutorial pages for the specific CLI flags for each operation.
Can JPedal process password-protected PDF files?
Yes. Pass in value when you load file with pdfManipulator.loadDocument(final File input, final byte[] password);
Does JPedal require any third-party libraries for PDF processing?
No. JPedal has no required third-party Java dependencies. There are no native binaries and no external tools required.
What Java version is required?
JPedal requires Java 17 as a minimum - see Which Java versions does JPedal support?