Installation

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:

<dependency>
  <groupId>org.aspose</groupId>
  <artifactId>aspose-pdf</artifactId>
  <version>0.1.0-alpha</version>
</dependency>

After adding the dependency, run mvn dependency:resolve to download the JAR.

Import Statements

The library packages all public API classes under the following top-level packages:

import org.aspose.pdf.*;              // Core API: Document, Page, Annotation, Form, etc.
import org.aspose.pdf.annotations.*;  // Annotation subclasses
import org.aspose.pdf.facades.*;      // Facade classes: PdfFileEditor, PdfAnnotationEditor, etc.

Verifying the Installation

After adding the dependency, verify the library loads correctly by creating a minimal document:

import org.aspose.pdf.*;

try (Document doc = new Document()) {
    Page page = doc.getPages().add();
    doc.save("test.pdf");
    System.out.println("Installed successfully. Pages: " + doc.getPages().size());
}

If the class resolves without error and test.pdf is created, the installation is complete.

Source Repository

The source code and issue tracker are available at https://github.com/aspose-pdf-foss/Aspose.PDF-FOSS-for-Java.

See Also