Channel guide

PDFluent for Java

Generally availableUpdated 2026-05-14
Star on GitHub
On this page

Install

One command. The package is on maven.pdfluent.com today.

com.pdfluent:pdfluent:1.1.0

Version 1.1.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.1.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.1.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)

PreviewIn 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.

  • 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.

Where to go next