pdfbox

From public sources

Apache PDFBox is an open-source Java library for creating, manipulating and extracting content from PDF documents in Java applications.

LibraryCategory: Libraries & SDKs · PDF & documentsOpen sourcedata checked Oct 15, 2026

Overview

Working with PDF files programmatically is hard: documents need to be generated, existing ones edited, and text or other content pulled out reliably. Apache PDFBox is an open-source Java library that handles these jobs, allowing developers to create new PDF documents, modify existing ones and extract content from them directly in their code. PDFBox also ships with several command line utilities for common PDF tasks, and it supports encryption in PDF documents through the Java Cryptography Architecture and the Bouncy Castle libraries. The project is published under the Apache License 2.0 and is maintained as a project of the Apache Software Foundation. PDFBox is intended for Java developers who need PDF processing inside their own applications or services. It is added as a Maven dependency and requires Java 11 or higher to build. Documentation, examples and community support are available through the project's website and mailing lists. Topics: java, pdf, content extraction, library. The repository is a mirror of the Apache PDFBox project and is hosted on GitHub. Note on limitations: the project's documentation notes that text extraction may return internal glyph encodings for some PDFs, and that text ordering requires sorting to be enabled.
  • content
  • java
  • library
  • pdf
  • pdfbox

Installation

Commands are shown, never run by the marketplace. Check them against the official documentation.
  • Build from sourceFrom public sourcesfrom catalog metadata

    Build from source: no validated build recipe — follow the repository instructions.

    github.com/apache/pdfbox ↗

Compatibility

Unknown means no evidence was found — not that the product is incompatible.
PlatformStatusArchitectureEvidenceConfidence
Node.jsUnknown———
PythonUnknown———
JVMUnknown———
.NETUnknown———
WebAssemblyUnknown———
Web browserUnknown———

Releases

checked Oct 29, 2026
No releases found on the source.

Quality profile

algorithm quality-v1.0 · assessed Oct 15, 2026
Quality Score73
Risk Score0
Confidence 1.00
Quality Score and Risk Score are different measures. A high score does not guarantee safety.

Score components

Maintenance · 2020
last activity 0 days ago
Documentation · 1515
README 6605 chars, description present
Ready to use · 150
install instructions: no; releases: no
Metadata · 1010
4/4 of description, homepage, license, topics
Releases · 102
0 release(s)
Category confidence · 1010
classifier confidence 1
Adoption · 109
3128 stars (log-dampened, 10k = max)
License clarity · 55
SPDX Apache-2.0
Community · 53
issues disabled/unknown, 968 forks

License

Apache-2.0
Known licensefrom the repository host

This is the catalog policy status, not legal advice.

Sources

github.com/apache/pdfboxPrimary★ 3,128 starslast activity Oct 15, 2026Primary repository · Confidence 1.00

Reviews

Sign in to write a review

No reviews yet.

Alternatives

README

From apache/pdfbox · license Apache-2.0 · fetched Oct 29, 2026

[codeql java]

Apache PDFBox

The Apache PDFBox library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. PDFBox also includes several command line utilities. PDFBox is published under the Apache License, Version 2.0.

PDFBox is a project of the Apache Software Foundation.

Binary Downloads

You can download binary versions for releases currently under development or older releases from our Download Page.

Build

You need Java 11 (or higher) and Maven 3 to build PDFBox. The recommended build command is:

mvn clean install

The default build will compile the Java sources and package the binary classes into jar packages. See the Maven documentation for all the other available build options.

Contribute

There are various ways to help us improve PDFBox.

Support

Please follow the guidelines at our Support Page.

If you have questions about how to use PDFBox do ask on the Users Mailing List. This will get you help from the entire community.

The PDFBox examples and the test code in the sources will also provide additional information.

And there are additional resources available on sites such as Stack Overflow.

If you are sure you have found a bug the please report the issue in our Issue Tracker.

Known Limitations and Problems

See the Issue Tracker for the full list of known issues and requested features. Some of the more common issues are:

  1. You get text like "G38G43G36G51G5" instead of what you expect when you are extracting text. This is because the characters are a meaningless internal encoding that point to glyphs that are embedded in the PDF document. The only way to access the text is to use OCR. This may be a future enhancement.

  2. You get an error message like java.io.IOException: Can't handle font width this MIGHT be due to the fact that you don't have the org/apache/pdfbox/resources directory in your classpath. The easiest solution is to include the apache-pdfbox-x.x.x.jar in your classpath.

  3. You get text that has the correct characters, but in the wrong order. This mght be because you have not enabled sorting. The text in PDF files is stored in chunks and the chunks do not need to be stored in the order that they are displayed on a page. By default, PDFBox does not sort the text.

License (see also LICENSE.txt)

Collective work: Copyright 2015 The Apache Software Foundation.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Export control

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See https://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The following provides more details on the included cryptographic software:

Apache PDFBox uses the Java Cryptography Architecture (JCA) and the Bouncy Castle libraries for handling encryption in PDF documents.

Open the repository ↗