# PDFluent for Java — Maven and Gradle

Source: https://pdfluent.com/docs/java/

Channel guide

# PDFluent for Java

Generally available Updated 2026-05-14

[Star on GitHub](https://github.com/pdfluent/pdfluent-sdk)

### On this page

- Install
- Smoke test
- Structured extraction (Preview)
- What this is good for
- Current limitations
- Licensing
- Where to go next

## Install

One command. The package is on [maven.pdfluent.com](https://maven.pdfluent.com/) today.

`com.pdfluent:pdfluent:1.5.0`

Version 1.5.0 is served from the PDFluent Maven repository at https://maven.pdfluent.com, so add it to your build next to the dependency. Maven Central carries 1.0.0; 1.1.x follows there later.

Or, in your Maven `pom.xml`:

xml

```
<repositories>
  <repository>
    <id>pdfluent</id>
    <url>https://maven.pdfluent.com</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>com.pdfluent</groupId>
    <artifactId>pdfluent</artifactId>
    <version>1.5.0</version>
  </dependency>
</dependencies>
```

Or, in your Gradle `build.gradle.kts`:

kotlin

```
repositories {
    mavenCentral()
    maven { url = uri("https://maven.pdfluent.com") }
}

dependencies {
    implementation("com.pdfluent:pdfluent:1.5.0")
}
```

## Smoke test

Open a PDF, print the page count. The example below is the smallest useful program — copy, paste, run.

java

```
import com.pdfluent.PdfDocument;

try (PdfDocument doc = PdfDocument.open("invoice.pdf")) {
    System.out.println(doc.pageCount() + " pages");
}
```

## Structured extraction (Preview)

Preview In Java, structured extraction returns Markdown from `doc.extractMarkdown`, a `List<Block>` from `doc.extractBlocks`, and Docling JSON from `extractDocling`. Structured extraction ships as Preview: output quality is still improving and the API may change in a minor release.

These methods come with the 1.1.0 Java package, served from the PDFluent Maven repository (see Install).

- Markdown: `doc.extractMarkdown(firstPage, pageCount)`.
- Blocks: `doc.extractBlocks(...)` returns a `List<Block>`.
- Docling JSON: `extractDocling(firstPage, pageCount, name)`.
- Image extraction is available on `PdfluentDocument`.

## What this is good for

- JVM applications and back-office pipelines
- Spring and Quarkus integrations
- Existing Maven and Gradle builds

## Current limitations

This list is honest, not exhaustive. The site-wide list lives at [Known limitations](https://pdfluent.com/docs/known-limitations/).

- Pin the dependency version for reproducible builds.
- XFA rendering fidelity is improving alongside the Rust core.
- JNI binaries currently ship for common platforms; less common architectures may need a build step.

## Licensing

PDFluent is published under the AGPLv3 and is complete under it. A yearly commercial licence removes the obligation to publish your own source; nothing in the build differs and nothing is activated, so a lapsed licence breaks nothing you have shipped. Details on the [licensing page](https://pdfluent.com/docs/licensing/).

## Where to go next

- [Open maven.pdfluent.com Browse versions and the published API.](https://maven.pdfluent.com/)
- [View pricing Annual licences with perpetual-fallback.](https://pdfluent.com/pricing/)
- [Contact licensing We respond within one business day.](mailto:hello@pdfluent.com?subject=Licensing)
- [All language channels The hub lists all language channels.](https://pdfluent.com/docs/)
