agentleFS
apacheapache/pdfbox/AGENTS.md

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
  1. Very specific:

    When evaluating code or reporting issues, note which branch is in scope.

    line 49
  2. Distinctive:

    All branches share the same multi-module Maven structure:

    line 55
  3. Distinctive:

    Avoid large refactorings in these areas unless explicitly requested:

    line 92
  4. Distinctive:

    Do NOT open a public JIRA issue for undisclosed vulnerabilities.

    line 121
  5. Very specific:

    Follow the existing code style.

    line 132
  6. Distinctive:

    Avoid introducing new runtime dependencies unless necessary.

    line 138

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md
<!--- 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:

  1. 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.
  2. 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

BranchStatusJava requirementLatest release
trunkFuture development (next major version, not yet released)Java 11+—
3.0Actively maintained — current stable seriesJava 8+3.0.7
2.0Actively maintained — legacy stable seriesJava 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 library
  • xmpbox/ — XMP metadata support library
  • io/ — I/O utilities shared across modules (3.0 and trunk only)
  • tools/ — Command-line utilities
  • debugger/ / debugger-app/ — PDF debugger application
  • examples/ — Standalone usage examples
  • benchmark/ — JMH benchmarks

Building

The standard build command is:

mvn clean install

To run only the tests without a full install:

mvn test

To build or test a specific module, use the -pl flag from the root:

mvn -pl pdfbox test

Minimum 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 — see SECURITY.md for 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.xml and an Eclipse formatter in pdfbox-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.

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 17 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 7 mentionsSep 2026: 1 mentionOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the apache/pdfbox repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about apache/pdfbox

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

33 more on GitHub

On Stack Overflow · 20

15 more on Stack Overflow
  • 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.