QPDF Creator & Producer

Understanding PDF metadata when QPDF is used as the transformation tool — learn how this content-preserving command-line utility and C++ library manipulates PDF documents while preserving their structure.

🆓 Open Source (Apache 2.0) 💻 Command-Line Tool 📅 Since 2001

📄 About This PDF Metadata

QPDF is a content-preserving PDF transformation tool. Unlike PDF generators, QPDF doesn't automatically set Producer or Creator metadata — it preserves existing metadata from the source PDF. You can use --remove-info to strip metadata or modify it via JSON updates.

QPDF and Metadata:

Default Behavior: Preserves existing metadata

--remove-info: Removes the Info dictionary (Title, Author, etc.)

--remove-metadata: Removes XMP metadata stream

JSON Updates: Can set /Producer, /Creator, /Author via --update-from-json

When you process a PDF with QPDF, the resulting file retains the original Producer and Creator unless you explicitly remove or modify them. QPDF is designed for structural transformations, not content creation, so it doesn't stamp its identity on files by default.

Content-Preserving

QPDF transforms PDF structure without altering visible content. Metadata is preserved unless explicitly removed or modified.

Metadata Control

Use --remove-info and --remove-metadata to strip metadata, or JSON updates to set custom Producer/Creator values.

📚 What is QPDF?

QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files. Created by Jay Berkenbilt in 2001 at Apex CoVantage, it was publicly released on SourceForge in 2008. QPDF can linearize, encrypt, decrypt, split, merge, and inspect PDF files. It's a low-level tool for working with PDF structure — it doesn't render PDFs or extract text.

Tool Information

Author:Jay Berkenbilt
Co-maintainer:Manfred Holger (since 2022)
Created:2001 (at Apex CoVantage)
First Public Release:April 29, 2008 (v2.0)
Website:qpdf.sourceforge.io

Technical Details

License:Apache License 2.0
Language:C++
C++ Version:C++17 (linking), C++20 (building)
Current Version:12.3.2
Documentation:qpdf.readthedocs.io

Why QPDF?

🔄

Content-Preserving

Transforms structure without altering visual content

🔐

Encryption Support

Full encryption/decryption with multiple algorithms

🐧

Cross-Platform

Linux, Windows, macOS — included in most Linux distros

💡 QPDF and pikepdf

pikepdf is a popular Python wrapper around QPDF's C++ library, providing Pythonic access to QPDF's functionality. If you see pikepdf in Python code, it's using QPDF under the hood for PDF manipulation.

⚙️ How QPDF Works

QPDF performs structural transformations on PDFs while preserving content:

Common Operations:

1

Linearize

Optimize for web viewing

2

Encrypt/Decrypt

Add or remove passwords

3

Merge/Split

Combine or extract pages

4

Inspect

Examine PDF structure

Project Timeline:

  • 2001: Jay Berkenbilt creates QPDF at Apex CoVantage for PDF structural analysis
  • 2005: Berkenbilt leaves Apex CoVantage, retains ownership of QPDF
  • 2008: First public release (v2.0) on SourceForge under Artistic License 2.0
  • 2014: GitHub mirror established for collaboration
  • 2018: Version 8.0 with major improvements
  • 2022: Manfred Holger joins as co-maintainer; license changed to Apache 2.0
  • 2022: Version 11.0 introduces JSON format for PDF manipulation
  • 2024: Version 12.0 released with C++20 build requirement

✨ Key Features

📄 PDF Transformations

  • Linearization (web optimization)
  • Page rotation, scaling
  • Split PDFs into individual pages
  • Merge multiple PDFs
  • Extract page ranges

🔐 Encryption

  • 40-bit, 128-bit, 256-bit encryption
  • AES and RC4 algorithms
  • User and owner passwords
  • Permission restrictions (print, copy, modify)
  • Decryption of protected PDFs

🔍 Inspection & Analysis

  • QDF mode for text-editable PDFs
  • JSON output format (v11+)
  • Show encryption parameters
  • Check PDF structure
  • Object inspection

📦 Optimization

  • Stream compression (zlib, zopfli)
  • Object stream handling
  • Remove orphan data
  • Normalize content streams
  • Optimize images

⚠️ What QPDF Doesn't Do

  • Does NOT render PDFs
  • Does NOT extract text
  • Does NOT create content from scratch
  • Does NOT edit page content (text, images)
  • Does NOT convert to other formats
  • Low-level structural tool only

📤 How to Use QPDF

QPDF is available in most Linux distributions and can be installed on Windows and macOS:

Installation:

# Debian/Ubuntu

sudo apt install qpdf

# Fedora/RHEL

sudo dnf install qpdf

# macOS (Homebrew)

brew install qpdf

# Windows (Chocolatey)

choco install qpdf

Common Commands:

# Linearize (optimize for web)

qpdf --linearize input.pdf output.pdf

# Decrypt a PDF

qpdf --decrypt input.pdf output.pdf

# Encrypt with password

qpdf --encrypt user-pw owner-pw 256 -- input.pdf output.pdf

# Merge PDFs

qpdf --empty --pages *.pdf -- merged.pdf

# Extract pages 1-5

qpdf input.pdf --pages . 1-5 -- output.pdf

# Split into single pages

qpdf --split-pages input.pdf output.pdf

Metadata Commands:

# Remove Info dictionary (Title, Author, etc.)

qpdf --remove-info input.pdf output.pdf

# Remove XMP metadata stream

qpdf --remove-metadata input.pdf output.pdf

# Remove all metadata and linearize (clean PDF)

qpdf --empty --pages input.pdf -- output.pdf

# Show encryption info

qpdf --show-encryption input.pdf

🔍 Understanding PDF Metadata

QPDF preserves existing metadata by default but provides several options for metadata manipulation:

Option Effect Use Case
--remove-info Removes the Info dictionary Strip Title, Author, Subject, Keywords, Creator, Producer, dates
--remove-metadata Removes XMP metadata stream Strip embedded XML metadata
--empty --pages Creates new PDF from pages Complete metadata removal (starts fresh)
--linearize Linearizes and removes orphan data Permanently removes old metadata after ExifTool edits
--update-from-json Updates PDF from JSON file Set custom Producer, Creator, Author, etc.

💡 QPDF + ExifTool Workflow

A common workflow: use ExifTool to edit PDF metadata (incremental update), then use qpdf --linearize to permanently remove the old data. ExifTool's incremental updates are reversible; QPDF linearization makes changes permanent.

Setting Metadata via JSON (v11+):

# Create a JSON file (metadata.json):

{

"qpdf": [

{ "jsonversion": 2 },

{

"obj:2 0 R": {

"value": {

"/Producer": "u:My Application",

"/Creator": "u:Custom Creator",

"/Author": "u:John Smith"

}

}

}

]

}

# Apply to PDF:

qpdf input.pdf --update-from-json=metadata.json output.pdf

QDF Mode for Inspection:

QDF creates a text-editable PDF for examining structure:

# Create QDF file

qpdf --qdf input.pdf output.qdf

# Edit in text editor, then fix cross-references

fix-qdf output.qdf > fixed.pdf

🛠️ Troubleshooting

Common issues when using QPDF:

Metadata Still Present After --remove-info

Cause: XMP metadata stream is separate from Info dictionary; also embedded objects may contain metadata.

Solution: Use both --remove-info and --remove-metadata. For complete removal, use qpdf --empty --pages input.pdf -- output.pdf which creates a fresh PDF. Embedded objects may still contain metadata — use ExifTool with -extractEmbedded to check.

Cannot Decrypt PDF — Wrong Password

Cause: PDF has owner password, user password, or both.

Solution: Try qpdf --password=PASSWORD --decrypt input.pdf output.pdf. If you have the owner password, you can decrypt fully. With only the user password (or no password for view-only restriction), QPDF can still process the file: qpdf --decrypt restricted.pdf unrestricted.pdf.

Output File Is Larger Than Input

Cause: QPDF may uncompress streams or add linearization data.

Solution: Use --compress-streams=y to ensure compression. For maximum compression, build QPDF with zopfli support and set QPDF_ZOPFLI=1. Use --object-streams=generate to enable object streams for smaller files.

PDF Is No Longer Linearized After Editing

Cause: Any modification to a linearized PDF breaks linearization.

Solution: Re-linearize after making changes: qpdf --linearize input.pdf output.pdf. Note that --linearize and --qdf are mutually exclusive — QDF mode disables linearization.

JSON Update Doesn't Work — Object Not Found

Cause: The PDF may not have an Info dictionary, or object numbers differ.

Solution: First inspect the PDF with qpdf --json input.pdf to find the correct object reference. If no Info dictionary exists, you need to create one and reference it from the trailer. See QPDF documentation for creating new objects via JSON.

❓ Frequently Asked Questions

QPDF doesn't automatically add its name as Producer — it preserves existing metadata. If you see "qpdf" in Producer metadata, someone explicitly set it via JSON update. QPDF is a content-preserving transformation tool: it modifies PDF structure without changing visual content or metadata (unless you use --remove-info or JSON updates).

Yes, QPDF is completely free and open source. Since version 7, it's released under the Apache License 2.0 (previously Artistic License 2.0). You can use it in commercial projects without restrictions. QPDF is included in virtually every Linux distribution.

QPDF was created in 2001 by Jay Berkenbilt at Apex CoVantage for internal PDF structural analysis. After leaving Apex in 2005 (with permission to retain ownership), Berkenbilt continued development. The first public release was version 2.0 on April 29, 2008 on SourceForge.

Both are command-line PDF tools, but they differ: QPDF is a C++ library focused on low-level PDF structure — linearization, encryption, and content-preserving transformations. pdftk (PDF Toolkit) is Java-based and focuses on high-level operations like merging, splitting, watermarking, and form filling. QPDF is more actively maintained and has better encryption support.

QDF (QPDF Data Format) is a special PDF format optimized for viewing and editing in a text editor. In QDF mode, streams are uncompressed, objects are pretty-printed, and comments show original object IDs. After editing, use the fix-qdf tool to update stream lengths and cross-references. QDF has been part of QPDF since its first release.

pikepdf is a Python library that wraps QPDF's C++ library, providing Pythonic access to PDF manipulation. It's well-maintained by James R. Barlow and offers functionality beyond what QPDF's command-line provides. If you're working in Python and need QPDF-style PDF manipulation, pikepdf is the recommended approach.

Yes, but it requires multiple steps: use --remove-info (Info dictionary) and --remove-metadata (XMP stream). For complete removal, create a fresh PDF: qpdf --empty --pages input.pdf -- output.pdf. However, embedded objects (images, fonts) may contain their own metadata — use ExifTool to check for remaining metadata.

🛠️ 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: QPDF PDF Metadata

  • Author: Jay Berkenbilt
  • Created: 2001 (public 2008)
  • Content-preserving transformations
  • License: Apache License 2.0
  • Co-maintainer: Manfred Holger (since 2022)
  • Current version: 12.3.2
  • C++ library + command-line
  • Preserves metadata by default
  • --remove-info/--remove-metadata to strip
  • pikepdf = Python wrapper