Aspose.PDF for Java is a PDF document creation component that enables your Java applications to read, write and manipulate PDF documents without using Adobe Acrobat.
| Directory | Description |
|---|---|
| examples/documentation | Runnable Java examples used by Aspose.PDF documentation. |
| docs | Repository structure and contribution guidance. |
- Set basic information (e.g. author, creator) of the PDF document.
- Configure PDF Page properties (e.g. width, height, cropbox, bleedbox etc.).
- Set page numbering, bookmark level, page sizes etc.
- Apply document open action, open mode as well as appearance.
- Document can have different page transition effects such as dissolve or box.
- Create PDF documents via
XML,APIorXMLandAPIcombined. - Ability to work with text, paragraphs, headings, hyperlinks, graphs, attachments etc.
- PDF documents can be encrypted up to 128 bits.
- Master and user passwords can be set for PDF encryption.
- Apply restrictions on content modification, copying, printing and other operations.
- Convert an existing XML file (
.XML) orXmlDocumentto a new PDF document or a PDF file stream. - Convert conventional Image formats into PDF file.
- Convert
PCLfiles into PDF file.
For a more comprehensive list of features, please visit Features of aspose.pdf Package.
- Supports 14 core fonts.
- Support for
Type 1,TrueType,Type 3,CJKfonts. Unicodesupport is available.- Add, search, extract and replace text in PDF files.
- Add/delete, extract and replace images.
- Insert, delete, split PDF pages.
- Support for Linearization (optimization for the web).
- Set and get XMP metadata.
- Validate (
PDF/A-1a,PDF/A-1b). - Work with bookmarks, annotations, PDF forms, stamps, watermarks and more.
For a more comprehensive list of features, please visit Features of com.aspose.pdf Package.
- Supports 14 core fonts.
- Support for
Type 1,TrueType,Type 3,CJKfonts. Unicodesupport is available.- Add, replace and extract text & images (from the entire PDF, a particular page, or a range of pages).
- Work with bookmarks, annotations, PDF forms, links, actions, signature and more.
- Print PDF to default, specified, physical, or virtual printer.
- Print PDF to
XPSfile or XPS printer.
For a more comprehensive list of features, please visit Features of com.aspose.pdf.facades Package.
Fixed Layout: PDF, XPS
Books: EPUB
Web: HTML
Other: TEX, XML, SVG
Microsoft Office: DOC, DOCX, XLS, XLSX, PPTX
Images: JPEG, PNG, BMP, TIFF, EMF
Other: MobiXML, XML, TEXT
CGM, MHT, PCL, PS, XSLFO, MD
- Microsoft Windows: Windows Desktop & Server (x86, x64)
- macOS: Mac OS X
- Linux: Ubuntu, OpenSUSE, CentOS, and others
- Java Version: JDK 25 or newer
Aspose hosts Java APIs at the Aspose Java Repository. You can use Aspose.PDF for Java directly in Maven projects with simple configuration. For detailed setup instructions, see Installing Aspose.PDF for Java from Aspose Repository.
Build all Maven modules from the repository root with:
mvn clean compileRun one documentation example runner with:
cd examples/documentation
mvn -DskipTests exec:java "-Dexec.mainClass=com.aspose.pdf.examples.basicoperations.BasicOperationsExamples"import com.aspose.pdf.Document;
import com.aspose.pdf.TextAbsorber;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
try (Document pdfDocument = new Document("input.pdf")) {
TextAbsorber textAbsorber = new TextAbsorber();
pdfDocument.getPages().accept(textAbsorber);
Files.writeString(Path.of("Extracted_text.txt"), textAbsorber.getText(), StandardCharsets.UTF_8);
}Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License