Apache PDFBox Creator & Producer

Understanding PDF metadata that shows Apache PDFBox as the Creator or Producer — learn how this Java library creates, manipulates, and extracts content from PDF documents.

🆓 Open Source (Apache 2.0) ☕ Java Library 📅 Since 2002

📄 About This PDF Metadata

When you examine a PDF file's properties and see Apache PDFBox as the Producer or Creator, it indicates that the document was created or modified using Apache PDFBox — a pure-Java library for working with PDF documents developed by the Apache Software Foundation.

Sample PDF Metadata from PDFBox:

Title: Annual Report 2024

Author: John Smith

Subject: Company Performance Summary

Creator: Java Application

Producer: Apache PDFBox

Creation Date: 2025-01-27 11:00:00

Keywords: report, annual, 2024

PDFBox allows full control over PDF metadata through the PDDocumentInformation class. You can set the Producer, Creator, Author, Title, Subject, Keywords, and dates programmatically. Unlike some libraries, PDFBox does not automatically set a default Producer — it must be explicitly set or will be empty.

PDF Creator

Set with setCreator() — the application that created the original document from which the PDF was generated.

PDF Producer

Set with setProducer() — the application that converted or produced the PDF file. Often set to "Apache PDFBox" or your application name.

📚 What is Apache PDFBox?

Apache PDFBox is an open-source pure-Java library that can be used to create, render, print, split, merge, alter, verify, and extract text and metadata from PDF files. Started in 2002 by Ben Litchfield on SourceForge to extract text for Apache Lucene search indexing, it became an Apache Incubator project in 2008 and graduated to a top-level Apache project in 2009.

Library Information

Original Author:Ben Litchfield
Started:2002 (SourceForge)
Apache Incubator:February 7, 2008
Top-Level Project:October 21, 2009
Website:pdfbox.apache.org

Technical Details

License:Apache License 2.0
Language:Java (pure Java)
Java Version:Java 8+ (v3.x), Java 6+ (v2.x)
Current Versions:3.0.6, 2.0.35
Maven:org.apache.pdfbox:pdfbox

Why Apache PDFBox?

Pure Java

No native dependencies — runs anywhere Java runs

🔧

Full PDF Control

Create, modify, merge, split, extract — complete PDF manipulation

🏛️

Apache Foundation

Mature, well-maintained project with active community

💡 PDFBox Companion Libraries

PDFBox includes companion libraries: FontBox for font handling, JempBox for XMP metadata, XMPBox for XMP processing, and Preflight for PDF/A validation. These work together to provide comprehensive PDF functionality.

⚙️ How PDFBox Works with PDFs

PDFBox provides both creation and manipulation capabilities for PDF documents:

Common Operations:

1

Create

New PDF documents from scratch

2

Modify

Edit existing PDFs

3

Extract

Text, images, metadata

4

Validate

PDF/A conformance

Project Timeline:

  • 2002: Ben Litchfield starts PDFBox on SourceForge for Lucene text extraction
  • 2008: Accepted into Apache Incubator (February 7)
  • 2009: Becomes Apache top-level project (October 21)
  • 2010: Version 1.0.0 released with digital signatures, font embedding
  • 2011: Preflight (PDF/A validation) donated by Atos Worldline
  • 2015: Named Open Source Partner of PDF Association
  • 2016: Version 2.0 released with major improvements
  • 2022: Version 3.0 released (Java 8+ required)

✨ Key Features

📝 Text Operations

  • Extract Unicode text from PDFs
  • Add text with various fonts
  • TrueType and Type 1 font support
  • Font embedding and subsetting
  • Text positioning and styling

📄 Document Operations

  • Create new PDF documents
  • Split and merge PDFs
  • Add, remove, reorder pages
  • Import pages from other PDFs
  • Overlay and watermarking

📋 Forms & Annotations

  • Fill PDF forms (AcroForms)
  • Extract form field data
  • Create and edit annotations
  • Digital signatures (sign and verify)
  • Timestamps and LTV signatures

🖼️ Graphics & Images

  • Add images (JPEG, PNG, TIFF, etc.)
  • Extract embedded images
  • Render PDF pages to images
  • Draw shapes and graphics
  • Color space support (RGB, CMYK)

🔒 Security & Validation

  • PDF encryption (40-bit, 128-bit, AES)
  • Password protection (user/owner)
  • Permission restrictions
  • Certificate-based encryption
  • Preflight: PDF/A-1b validation
  • PDF specification conformance
  • Bouncy Castle integration
  • Print PDF via Java API

📤 How to Use PDFBox

PDFBox can be added to your Java project via Maven, Gradle, or direct JAR download:

Maven Dependency:

<dependency>

<groupId>org.apache.pdfbox</groupId>

<artifactId>pdfbox</artifactId>

<version>3.0.6</version>

</dependency>

Create PDF with Metadata:

import org.apache.pdfbox.pdmodel.PDDocument;

import org.apache.pdfbox.pdmodel.PDDocumentInformation;

import org.apache.pdfbox.pdmodel.PDPage;

 

// Create a new document

try (PDDocument doc = new PDDocument()) {

// Add a page

doc.addPage(new PDPage());

 

// Set metadata

PDDocumentInformation info = doc.getDocumentInformation();

info.setTitle("My Document");

info.setAuthor("John Smith");

info.setSubject("Sample PDF");

info.setKeywords("sample, pdf, java");

info.setCreator("My Application");

info.setProducer("Apache PDFBox");

info.setCreationDate(Calendar.getInstance());

 

// Save the document

doc.save("output.pdf");

}

Command-Line Utilities:

PDFBox includes command-line tools for common operations:

# Extract text from PDF

java -jar pdfbox-app.jar export:text input.pdf output.txt

# Convert PDF to images

java -jar pdfbox-app.jar export:images input.pdf

# Merge PDFs

java -jar pdfbox-app.jar merge file1.pdf file2.pdf merged.pdf

# Encrypt PDF

java -jar pdfbox-app.jar encrypt input.pdf output.pdf -O owner -U user

🔍 Understanding PDF Metadata

PDFBox provides the PDDocumentInformation class for reading and writing PDF metadata:

PDF Metadata Getter Method Setter Method
Title getTitle() setTitle(String)
Author getAuthor() setAuthor(String)
Subject getSubject() setSubject(String)
Keywords getKeywords() setKeywords(String)
Creator getCreator() setCreator(String)
Producer getProducer() setProducer(String)
Creation Date getCreationDate() setCreationDate(Calendar)
Modification Date getModificationDate() setModificationDate(Calendar)
Trapped getTrapped() setTrapped(String)
Custom getCustomMetadataValue(key) setCustomMetadataValue(key, value)

💡 XMP Metadata Support

For advanced XMP metadata, use the XMPBox module. This allows working with Dublin Core, Adobe PDF Schema, and XMP Basic schemas for PDF/A compliance and Factur-X/ZUGFeRD electronic invoices.

Sample Producer Values:

Source Producer Value
Default (if set)Apache PDFBox
With versionApache PDFBox 3.0.6
Custom applicationYour Application Name
CombinedMy App (powered by Apache PDFBox)
Not setEmpty/null

Extract Metadata Example:

try (PDDocument doc = Loader.loadPDF(new File("input.pdf"))) {

PDDocumentInformation info = doc.getDocumentInformation();

System.out.println("Title: " + info.getTitle());

System.out.println("Author: " + info.getAuthor());

System.out.println("Producer: " + info.getProducer());

System.out.println("Creator: " + info.getCreator());

}

🛠️ Troubleshooting

Common issues when using Apache PDFBox:

Text Extraction Returns Gibberish ("G38G43G36...")

Cause: The PDF uses embedded fonts with meaningless internal encoding that maps to glyphs, not standard character codes.

Solution: This is a limitation with certain PDFs where text is drawn using custom glyph mappings. The only way to extract text from such PDFs is using OCR (Optical Character Recognition). Consider integrating Tesseract OCR for these cases.

IOException: Can't Handle Font Width

Cause: Missing PDFBox resources in the classpath.

Solution: Ensure the org/apache/pdfbox/resources directory is included in your classpath. If using Maven, the dependency should include all required resources. Try a clean rebuild of your project.

OutOfMemoryError with Large PDFs

Cause: PDFBox loads the entire document into memory by default.

Solution: Increase JVM heap size with -Xmx. For very large PDFs, use Loader.loadPDF() with MemoryUsageSetting.setupTempFileOnly() to use temporary files instead of memory. Process pages incrementally rather than loading all at once.

Encrypted PDF Cannot Be Opened

Cause: PDF is password-protected or uses unsupported encryption.

Solution: Use Loader.loadPDF(file, password) to supply the password. PDFBox supports both owner and user passwords. Add Bouncy Castle dependency for AES encryption support: org.bouncycastle:bcprov-jdk15on.

Images Not Rendering Correctly

Cause: Missing image codec support or incompatible image format.

Solution: Add the JBIG2 ImageIO plugin for JBIG2 images: org.apache.pdfbox:jbig2-imageio. For JPEG2000 support, add the jai-imageio-jpeg2000 dependency. Ensure you're using the latest PDFBox version for best format support.

❓ Frequently Asked Questions

When a PDF shows "Apache PDFBox" as the Producer, it means the PDF was created or modified using Apache PDFBox, an open-source Java library for working with PDF documents. PDFBox is part of the Apache Software Foundation and is one of the most popular Java libraries for PDF manipulation.

Yes, Apache PDFBox is completely free and open source, released under the Apache License 2.0. This permissive license allows you to use, modify, and distribute PDFBox in both open-source and commercial projects without restrictions or fees.

PDFBox was started in 2002 by Ben Litchfield on SourceForge, originally to extract text from PDFs for Apache Lucene search indexing. It became an Apache Incubator project on February 7, 2008 and graduated to a top-level Apache project on October 21, 2009. Version 1.0.0 was released in February 2010.

Apache PDFBox is fully free under Apache License 2.0, while iText uses AGPL (free for open-source) or requires commercial licensing. PDFBox is better for reading/parsing/extracting from existing PDFs. iText has more features for complex PDF creation. For most use cases, PDFBox is sufficient and avoids licensing concerns.

Preflight is a PDFBox module for validating PDF files against the PDF/A-1b standard for archival documents. It was originally developed by Atos Worldline (named PaDaF) and donated to the Apache PDFBox project in 2011. Use it to verify documents conform to PDF/A requirements.

Yes, PDFBox fully supports digital signatures. You can create visible and invisible signatures, add timestamps, use PKCS#12 keystores or smart cards, and verify existing signatures. PDFBox supports PAdES (PDF Advanced Electronic Signatures) and LTV (Long-Term Validation) signatures with Bouncy Castle integration.

PDFBox 3.x requires Java 8 or higher. PDFBox 2.x works with Java 6 and above. For new projects, use PDFBox 3.x for the latest features and improvements. Both versions are actively maintained with security updates.

🛠️ Related Tools

Viewer

PDF Metadata Viewer

Free tool to view PDF metadata including Creator, Producer, and version information.

View PDF Metadata →
Converter

PDF Converter

Convert PDF files to Excel, Word, and other formats.

Convert PDF Files →

📝 Summary: Apache PDFBox PDF Metadata

  • Original Author: Ben Litchfield
  • Started: 2002 (SourceForge)
  • Apache top-level: 2009
  • License: Apache License 2.0
  • Organization: Apache Software Foundation
  • Current versions: 3.0.6, 2.0.35
  • Pure Java (no native deps)
  • PDDocumentInformation for metadata
  • Preflight for PDF/A validation
  • Digital signatures supported