GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - docling-project/docling-java: A Java API for Docling

BranchesTags
Open more actions menu

Latest commit

 

History

674 Commits
674 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.spotless
.spotless
 
 
buildSrc
buildSrc
 
 
docling-bom
docling-bom
 
 
docling-core
docling-core
 
 
docling-serve
docling-serve
 
 
docling-testcontainers
docling-testcontainers
 
 
docling-testing
docling-testing
 
 
docs
docs
 
 
gradle
gradle
 
 
test-report-aggregation
test-report-aggregation
 
 
.all-contributorsrc
.all-contributorsrc
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
dco.txt
dco.txt
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
jreleaser.yml
jreleaser.yml
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

Welcome to the Docling Java Project!

Docling Java

This is the repository for Docling Java, a Java API for using Docling.

Docs docling-core version docling-serve-api version docling-serve-client version docling-testcontainers version License MIT codecov Discord OpenSSF Best Practices

Docling simplifies document processing, parsing diverse formats, including advanced PDF understanding, and providing seamless integrations with the Generative AI ecosystem.

Features

  • πŸ—‚οΈ Parsing of multiple document formats incl. PDF, DOCX, PPTX, XLSX, HTML, WAV, MP3, VTT, images (PNG, TIFF, JPEG, ...), and more
  • πŸ“‘ Advanced PDF understanding incl. page layout, reading order, table structure, code, formulas, image classification, and more
  • 🧬 Unified, expressive DoclingDocument representation format
  • β†ͺ️ Various export formats and options, including Markdown, HTML, DocTags and lossless JSON
  • πŸ”’ Local execution capabilities for sensitive data and air-gapped environments
  • πŸ€– Plug-and-play integrations including LangChain4j
  • πŸ” Extensive OCR support for scanned PDFs and images
  • πŸ‘“ Support of several Visual Language Models (GraniteDocling)
  • πŸŽ™οΈ Audio support with Automatic Speech Recognition (ASR) models

Documentation

See the documentation for complete information on the various artifacts that are provided by this project.

Artifacts

This project provides the following artifacts:

  • docling-core: Java API for working with the data types used by Docling for document representation (see Docling Core).
  • docling-serve-api: Java API for interacting with a Docling Serve backend. It's framework‑agnostic.
  • docling-serve-client: A reference implementation of the docling-serve-api using Java's HttpClient and Jackson to connect to a Docling Serve endpoint.
  • docling-testing: Utilities for testing Docling integration.
  • docling-testcontainers: A Testcontainers module for running Docling in a Docker container.

Getting started

Use DoclingServeApi.convertSource() to convert individual documents (make sure both docling-serve-api and docling-serve-client are on your classpath).

For example:

import ai.docling.serve.api.DoclingServeApi;
import ai.docling.serve.api.convert.request.ConvertDocumentRequest;
import ai.docling.serve.api.convert.request.source.HttpSource;
import ai.docling.serve.api.convert.response.InBodyConvertDocumentResponse;

DoclingServeApi doclingServeApi = DoclingServeApi.builder()
    .baseUrl("<location of docling serve instance>")
    .build();

ConvertDocumentRequest request = ConvertDocumentRequest.builder()
    .source(
        HttpSource.builder()
            .url(URI.create("https://arxiv.org/pdf/2408.09869"))
            .build()
    )
    .build();

InBodyConvertDocumentResponse response = (InBodyConvertDocumentResponse) doclingServeApi.convertSource(request);
System.out.println(response.getDocument().getMarkdownContent());

If you're unsure of the concrete type returned by the convert API, you can handle it dynamically using the getResponseType() method:

import ai.docling.serve.api.convert.response.ResponseType;

// ... your code to create and configure the request ...

var result = doclingServeApi.convertSource(request);

switch(result.getResponseType()) {
    case ResponseType.IN_BODY -> // Response is InBodyConvertDocumentResponse
    case ResponseType.ZIP_ARCHIVE -> // Response is ZipArchiveConvertDocumentResponse
    case ResponseType.PRE_SIGNED_URL -> // Response is PreSignedUrlConvertDocumentResponse
    case ResponseType.PRE_SIGNED_URL_RESPONSE -> // Response is PreSignedUrlConvertResponse (with per-document artifact download URLs)
}

More usage information is available in the docs.

Get help and support

Please feel free to connect with us using the discussion section.

Contributing

Please read Contributing to Docling Java for details.

License

The Docling codebase is under MIT license. For individual model usage, please refer to the model licenses found in the original packages.

IBM ❀️ Open Source AI

The project was started by the AI for knowledge team at IBM Research Zurich.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Eric Deandrea
Eric Deandrea

πŸ’» πŸ–‹ πŸ“– πŸ€” πŸš‡ 🚧 πŸ“† ⚠️ πŸ‘€
Thomas Vitale
Thomas Vitale

πŸ’» πŸ–‹ πŸ“– πŸ€” πŸš‡ 🚧 πŸ“† ⚠️ πŸ‘€
Alex Soto
Alex Soto

πŸ€” πŸ“†
Cesar Berrospi Ramis
Cesar Berrospi Ramis

πŸ€”
Michele Dolfi
Michele Dolfi

🎨 πŸ€” πŸš‡ πŸ’¬
Andrea Cosentino
Andrea Cosentino

🎨 πŸ“£ πŸ€” πŸ’» πŸ“–
jmb-streamsets
jmb-streamsets

πŸ€” 🎨
insectengine
insectengine

πŸ–‹ 🎨
Maxim Lysak
Maxim Lysak

πŸ–‹ 🎨
warnulf
warnulf

πŸ›
Kristian Rickert
Kristian Rickert

πŸ’» πŸ€” πŸ“– ⚠️
Kaleab A.
Kaleab A.

πŸ’» πŸ“–
Mohammed Faisal
Mohammed Faisal

πŸ’» ⚠️
Arpan Chakraborty
Arpan Chakraborty

πŸ’» ⚠️ πŸ–‹ πŸ“–
Rohan Kurian
Rohan Kurian

πŸ’» πŸ“– πŸ€” πŸ”§ ⚠️ πŸš‡
Nelson Baby
Nelson Baby

πŸ’»
dan-m62
dan-m62

πŸ’» πŸ€”
Roman Kudryashov
Roman Kudryashov

πŸ›
Margi
Margi

⚠️
Sean Fitzpatrick
Sean Fitzpatrick

⚠️
Sweta Kumari
Sweta Kumari

🚧
Ashfaq
Ashfaq

πŸ’» πŸ›
Naman-Gururani
Naman-Gururani

πŸ’»
Olischn
Olischn

πŸ€”
Raphael Fakhri
Raphael Fakhri

πŸ› πŸ’»

This project follows the all-contributors specification. Contributions of any kind are welcome!

About

A Java API for Docling

docling-project.github.io/docling-java/

Topics

aidoclingjavarag

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

144 stars

Watchers

2 watching

Forks

31 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.