explaingit

meistrari/pdq

Analysis updated 2026-05-18

25RustAudience · developerComplexity · 2/5Setup · easy

TLDR

pdq is a fast, dependency-free Rust tool and library for splitting, merging, counting, rendering, and extracting text from PDF files.

Mindmap

mindmap
  root((pdq))
    What it does
      Split PDFs
      Merge PDFs
      Render to PNG
      Extract text and page count
    Tech stack
      Rust
      hayro renderer
    Use cases
      Bulk page splitting
      Document merging
      Metadata inspection
      Text extraction
    Audience
      Backend developers
      CLI tool users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Split a large PDF into one file per page or into fixed-size page chunks.

USE CASE 2

Merge several PDF files into a single combined document.

USE CASE 3

Extract specific page ranges from a PDF, including out-of-order or reversed ranges.

USE CASE 4

Rasterize PDF pages to PNG images or pull out positioned text as JSON.

What is it built with?

Rust

How does it compare?

meistrari/pdqasync-herald/herald-engineogham/rust-number-prefix
Stars252525
LanguageRustRustRust
Last pushed2021-07-20
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Install via cargo install pdq, render feature needs no extra system dependencies.

License terms are referenced via a badge but not stated in plain language in the README excerpt provided.

In plain English

pdq is a command line tool and library for working with PDF files: splitting them apart, merging them together, counting pages, rendering pages to images, and pulling out text. It is written entirely in Rust with no dependence on external programs or C libraries, so it ships as a single self contained binary with nothing extra to install. The project is built for speed on large or difficult files. According to the README, it can split a 200 megabyte, over 12,000 page PDF into one file per page in about a second, and it handles PDFs that trip up other established tools, including ones that hit timeouts on certain court documents. Encrypted PDFs using RC4 or AES are decrypted automatically when opened, and files with broken or missing internal indexes are repaired on the fly using the same recovery approach mainstream PDF readers use. Command line usage covers common jobs: counting a file's pages, splitting a document into individual page files or fixed size chunks, extracting specific page ranges into new files, merging multiple PDFs into one, reading each page's dimensions and rotation without rendering anything, rasterizing pages to PNG images at a chosen resolution, and extracting positioned text runs as structured data. Page ranges can be written in flexible ways, such as picking pages from the end of the document or listing them out of order. Installation is done through Rust's package manager, either by installing the published crate directly or building from a cloned copy of the source. Everything the command line tool does is also available as a library for use inside other Rust programs, with some extra options only available that way, such as choosing specific pages per input file when merging.

Copy-paste prompts

Prompt 1
Show me the pdq command to split a 500-page PDF into chunks of 50 pages each.
Prompt 2
How do I merge three PDF files into one using pdq from the command line?
Prompt 3
Write a pdq command that extracts pages 10 through 20 into a new PDF file.
Prompt 4
How do I use pdq as a Rust library instead of the CLI to select page ranges per input when merging?

Frequently asked questions

What is pdq?

pdq is a fast, dependency-free Rust tool and library for splitting, merging, counting, rendering, and extracting text from PDF files.

What language is pdq written in?

Mainly Rust. The stack also includes Rust.

What license does pdq use?

License terms are referenced via a badge but not stated in plain language in the README excerpt provided.

How hard is pdq to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pdq for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.