Installation
This guide shows how to set up Aspose.PDF FOSS for Java using Maven, verify the installation, and add the library packages. Aspose.PDF FOSS for Java is MIT-licensed and requires no API key or commercial agreement.
System Requirements
Aspose.PDF FOSS for Java requires Java 11 or later (LTS releases recommended). The library has no proprietary dependencies and is MIT-licensed — no API key or commercial agreement is required.
Maven Installation
Add the following dependency to your pom.xml. After adding the dependency,
run mvn dependency:resolve to download the JAR:
<dependency>
<groupId>org.aspose</groupId>
<artifactId>aspose-pdf</artifactId>
<version>0.1.0-alpha</version>
</dependency>Library Packages
The library organises all public API classes under three top-level packages. Add these declarations at the top of any Java source file that uses the API:
// Core API: Document, Page, Annotation, Form, etc.
org.aspose.pdf.*
// Annotation subclasses
org.aspose.pdf.annotations.*
// Facade classes: PdfFileEditor, PdfAnnotationEditor, etc.
org.aspose.pdf.facades.*Verifying the Installation
After adding the dependency, verify the library loads correctly by creating and saving
a minimal document. If the class resolves without error and test.pdf is created,
the installation is complete:
try (Document doc = new Document()) {
PageCollection pages = doc.getPages();
Page page = pages.add();
doc.save("test.pdf");
System.out.println("Installed successfully. Pages: " + pages.getCount());
}Source Repository
The source code and issue tracker are available at
https://github.com/aspose-pdf-foss/Aspose.PDF-FOSS-for-Java.