pdfbox
AGENTS.md3.1k starsChanged 17 months agoApache-2.0View on GitHub
http://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. ---> This file is read by automated agents (security scanners, code analyzers, AI assistants) operating on this repository. It points them at the human-authored references they should consult before producing output. Agents…
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 49
When evaluating code or reporting issues, note which branch is in scope.
- Distinctive: line 55
All branches share the same multi-module Maven structure:
- Distinctive: line 92
Avoid large refactorings in these areas unless explicitly requested:
- Distinctive: line 121
Do NOT open a public JIRA issue for undisclosed vulnerabilities.
- Very specific: line 132
Follow the existing code style.
- Distinctive: line 138
Avoid introducing new runtime dependencies unless necessary.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!---
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
http://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.
--->Agent Guidance
This file is read by automated agents (security scanners, code analyzers, AI assistants) operating on this repository. It points them at the human-authored references they should consult before producing output.
Prerequisites — Must Read Before Proceeding
Agents MUST read the following files before conducting any analysis, security assessment, or code review of this repository:
- SECURITY.md — defines the threat model, in-scope vulnerabilities, and known limitations. Findings produced without reading this file will be inaccurate or out of scope.
- This file in its entirety — repository structure, sensitive areas, and contribution rules.
Project Overview
Apache PDFBox is a Java library for working with PDF documents. It is used
as a dependency (pdfbox.jar) in other Java projects and is accessed through
its public Java API. The project also ships several command-line utilities.
Branches
| Branch | Status | Java requirement | Latest release |
trunk | Future development (next major version, not yet released) | Java 11+ | — |
3.0 | Actively maintained — current stable series | Java 8+ | 3.0.7 |
2.0 | Actively maintained — legacy stable series | Java 6+ | 2.0.36 |
When evaluating code or reporting issues, note which branch is in scope.
Security fixes are applied to both 3.0 and 2.0. New features target
trunk and 3.0.
Sub-modules
All branches share the same multi-module Maven structure:
pdfbox/— Core library (PDF parsing, rendering, text extraction, encryption)fontbox/— Font handling support libraryxmpbox/— XMP metadata support libraryio/— I/O utilities shared across modules (3.0andtrunkonly)tools/— Command-line utilitiesdebugger//debugger-app/— PDF debugger applicationexamples/— Standalone usage examplesbenchmark/— JMH benchmarks
Building
The standard build command is:
mvn clean installTo run only the tests without a full install:
mvn testTo build or test a specific module, use the -pl flag from the root:
mvn -pl pdfbox testMinimum Java version depends on the branch — see the table above.
Sensitive Areas
The following areas have historically been the source of subtle bugs and security issues. Changes here require extra care and regression testing. Avoid large refactorings in these areas unless explicitly requested:
- PDF parsing and xref recovery
- Font parsing and font substitution
- Stream decoding and decompression
- Incremental save/update logic
- Encryption and digital signatures
- Rendering and text extraction ordering
Security
Security model and scope: SECURITY.md, also published at https://pdfbox.apache.org/security.html.
Key points from the security model:
- Processing malformed PDFs is partially in scope: crashes, unchecked
exceptions (
NullPointerException,StackOverflowError), or general resource consumption from large PDFs are known limitations, not security vulnerabilities. However, disproportionate resource consumption triggered by small, attacker-controlled inputs may be in scope — seeSECURITY.mdfor the full scope definition. - Remote code execution or privilege escalation from untrusted PDFs is in scope.
- Issues that require the attacker to control the Java application's classpath or configuration are out of scope.
For a list of known CVEs, see https://pdfbox.apache.org/security.html.
To report a new vulnerability, send a plain-text email to security@apache.org. Do NOT open a public JIRA issue for undisclosed vulnerabilities. Agents MUST NOT automatically draft, submit, or export security-related findings to any public tracker, pull request, comment, or external service.
Contribution Guidelines
- Pull requests on this GitHub repository are welcome.
- Bug reports and feature requests go in the JIRA issue tracker.
- Code must be compatible with the minimum Java version of the target branch (see table above).
- Follow the existing code style; a Checkstyle configuration is provided in
pdfbox-checkstyle-5.xmland an Eclipse formatter inpdfbox-eclipse-formatter.xml. - Parser, rendering, font, extraction, encryption, or signing fixes should include a minimal reproducer document where practical, along with regression tests covering the reported behavior.
- Avoid introducing new runtime dependencies unless necessary. Security-sensitive or cryptographic dependencies require maintainer review.
- For questions, use the Users Mailing List.
Trending
Less talk lately.about the whole repository
Who's talking about apache/pdfbox
- Stack Overflow“OpenPDF : iText 2.1.7 XXE vulnerability”Stack Overflow · Jan 17, 2020 · 5 votes
- Stack Overflow“Buffered RandomAccessFile java”Stack Overflow · Mar 30, 2021 · 4 votes
- Stack Overflow“pdfbox 2.0.2 > Calling of PageDrawer.processPage method caught exceptions”Stack Overflow · Aug 13, 2016 · 4 votes
- Stack Overflow“PDFBox 1.8 - Signing PDF Document using TSA (Time Stamp Autority)”Stack Overflow · Dec 12, 2014 · 4 votes
- Stack Overflow“how to print unusual characters on PDF (using pdfbox)”Stack Overflow · Jan 5, 2015 · 3 votes
The biggest 5 of 58 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 58
Talked about on GitHub and Stack Overflow (58 times).
On GitHub · 38
- Jul 24, 2022BUG: Ignore if '/Perms' verify failed — py-pdf/pypdf2 reactions · 1 comment
- May 31, 2026Port benchmark folder — erikbra/pdfbox-netsays it tested it1 reaction
- May 31, 2026Port "debugger" and "debugger-app" folders — erikbra/pdfbox-net1 reaction
- May 31, 2026Make examples files more alike the PdfBox original ones — erikbra/pdfbox-net1 reaction
- May 31, 2026Implement the rest of the tests for FontBox — erikbra/pdfbox-net1 reaction
33 more on GitHub
- May 25, 2026Upstream PDFBox has new commits to sync — erikbra/pdfbox-net1 reaction
- May 23, 2026Fully port fontbox/** — erikbra/pdfbox-net1 reaction
- May 23, 2026Port printing* and util* classes — erikbra/pdfbox-net1 reaction
- May 23, 2026Port pdfparser* and pdfwriter* — erikbra/pdfbox-net1 reaction
- May 23, 2026Port rendering* and text* — erikbra/pdfbox-net1 reaction
- May 22, 2026Port all contentstream* and filter* folders — erikbra/pdfbox-net1 reaction
- May 22, 2026Implement more of the PdModel* classses — erikbra/pdfbox-net1 reaction
- May 22, 2026Implement more of the IO* classes — erikbra/pdfbox-net1 reaction
- May 22, 2026Implement more of the COS* classes — erikbra/pdfbox-net1 reaction
- Oct 28, 2026Upstream PDFBox has new commits to sync — erikbra/pdfbox-net0 reactions
- Oct 12, 2026[PdfCraft] [Bug] List box selection issues in PDF forms + suggestion for additional test fixtures — storytold/pdfcraft0 reactions · 2 comments
- Sep 6, 2026Upstream PDFBox has new commits to sync — erikbra/pdfbox-net0 reactions
- Aug 31, 2026Display Signature Validation like Adobe — embedpdf/runtime0 reactions
- Aug 17, 2026Upstream PDFBox has new commits to sync — erikbra/pdfbox-net0 reactions
- Aug 9, 2026Upstream PDFBox 3.0 has new commits to sync — erikbra/pdfbox-net0 reactions · 1 comment
- Aug 9, 2026Upstream PDFBox has new commits to sync — erikbra/pdfbox-net0 reactions
- Aug 3, 2026Upstream PDFBox has new commits to sync — erikbra/pdfbox-net0 reactions
- Aug 2, 2026Upstream PDFBox 3.0 has new commits to sync — erikbra/pdfbox-net0 reactions
- Jul 20, 2026Upstream PDFBox has new commits to sync — erikbra/pdfbox-net0 reactions
- Jun 21, 2026Allow PlainTokenizer to break tokens on digits, only when parsing CMap and fix #1331 — UglyToad/PdfPig0 reactions
- May 31, 2026Port benchmark module to BenchmarkDotNet — erikbra/pdfbox-netsays it tested it0 reactions · 3 comments
- May 31, 2026Port PdfBox examples module: replace closeout stub with 94 individually-ported C# files + add examples test project — erikbra/pdfbox-net0 reactions · 6 comments
- May 26, 2026fix(deps): update dependency org.apache.pdfbox:pdfbox to v2.0.24 [security] — bcgov/nr-brmb-ast0 reactions
- May 18, 2026Add PDFBox→.NET feasibility assessment, phased execution plan, and mechanical conversion skills documentation — erikbra/pdfbox-net0 reactions · 10 comments
- Apr 27, 2026fix(libpdfbox2-java): CVE-2026-23907 — deepin-community/libpdfbox2-java0 reactions · 2 comments
- Jul 22, 2025Support PDF function objects — py-pdf/pypdf0 reactions
- Aug 27, 2022Other PDF Editing Library — stefnotch/pdf-editor0 reactions · 3 comments
- Apr 8, 2021Create a tool or example for converting from normal to booklet and reverse — albfernandez/itext20 reactions · 1 comment
- Aug 10, 2020Drop-in replacement to GhostScript — open-source-ideas/ideas0 reactions
- Jun 24, 2020Improve file filters with Humberto suggestions — sailuh/kaiaulu0 reactions
- Feb 10, 2020算法大赛 - 简历提取 — wuyuedefeng/blogs0 reactions
- Nov 22, 2019WS-2016-0130 (Low) detected in pdfbox-1.8.10.jar — finnessyj/opensphere-desktop0 reactions
- Mar 17, 2019WS-2016-0130 Low Severity Vulnerability detected by WhiteSource — osgirl/tika_pdf_celgene0 reactions
On Stack Overflow · 20
- Jan 17, 2020OpenPDF : iText 2.1.7 XXE vulnerability5 votes · 1 answer
- Mar 30, 2021Buffered RandomAccessFile java4 votes
- Aug 13, 2016pdfbox 2.0.2 > Calling of PageDrawer.processPage method caught exceptions4 votes · 1 answer
- Dec 12, 2014PDFBox 1.8 - Signing PDF Document using TSA (Time Stamp Autority)4 votes · 1 answer
- Jan 5, 2015how to print unusual characters on PDF (using pdfbox)3 votes
15 more on Stack Overflow
- Jul 3, 2023Insert button widget/annotation in PDF using PDFBox2 votes
- Oct 30, 2019Can we extract texts between tables in PDF using Tabula in Java?2 votes
- Aug 1, 2026How to inject HarfBuzz-shaped Glyph IDs and Positions into PDFBox 3.0 content stream?1 vote
- Jan 28, 2025PDFBOX3 sign - bouncycastle - cannot create signer: No installed provider supports this key: sun.security.ec.ECPrivateKeyImpl1 vote
- Apr 4, 2022Embedded timestamp could not be verified for certain TSA1 vote · 1 answer
- Dec 14, 2021PDFBox not working when try getSignatureDictionaries1 vote
- Aug 4, 2020Run class main from groovy script using grape1 vote · 1 answer
- Nov 14, 2017Can PDFBox sign all 'Approval Signatures' instead of always making first signature as 'Certified'?1 vote · 1 answer
- Feb 22, 2011Get all words in a PDF + their location without interop1 vote
- Nov 23, 2021Setting MD 1 with PDFBOX invalidates the Certificate0 votes
- Jan 21, 2019PDF files merge : remove blank at end of page. I am using PDFBox v2.0.13 to achieve that0 votes · 1 answer
- Oct 3, 2017PDFBox Digital Signature using HSM Service0 votes
- Sep 25, 2016PDFBox 2.0.3 Set cropBox using TextPosition coordinates0 votes · 1 answer
- Sep 2, 2015Error trying to show Spanish or French characters with PDFBOX0 votes
- May 6, 2025external pdf signing with pdfbox 2.0.34 - The document has been altered or corrupted since the Signature was applied-1 votes · 2 answers
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

