Skip to content

Getting Started with PDF Oxide CLI

pdf-oxide is a command-line tool for fast, local PDF processing. It ships the same Rust core that powers the library — zero cloud, zero dependencies.

One command — auto-detects your OS and architecture:

Linux / macOS

curl -fsSL oxide.fyi/install.sh | sh

Windows (PowerShell)

irm oxide.fyi/install.ps1 | iex

Alternative Installation

Homebrew (macOS / Linux)

brew install yfedoseev/tap/pdf-oxide

Cargo

cargo install pdf_oxide_cli

cargo-binstall (pre-built binary)

cargo binstall pdf_oxide_cli

Pre-built binaries

Download from GitHub Releases and add to your PATH.

Quick Start

# Extract text
pdf-oxide text document.pdf

# Convert to Markdown
pdf-oxide markdown document.pdf -o output.md

# Convert to HTML
pdf-oxide html document.pdf -o output.html

# Show PDF info (page count, metadata, encryption)
pdf-oxide info document.pdf

# Search for text (regex supported)
pdf-oxide search document.pdf "pattern"

Commands

Command Description Key flags
text Extract plain text --format plain|words|lines, --area x,y,w,h
paths Extract vector paths --format json|rects|lines, --area x,y,w,h
markdown Convert to Markdown
html Convert to HTML
info Show metadata and page count
search Search for text (regex) -i (ignore case), --pages
images Extract images --area x,y,w,h, --pages
render Render pages to PNG/JPEG --dpi N, --format png|jpeg, --quality N
merge Merge multiple PDFs (2+ files required)
split Split into individual pages
create Create PDF from Markdown / HTML / text --from markdown|html|text
compress Compress and optimize
encrypt Encrypt with password (planned v0.4.0 — placeholder today)
decrypt Decrypt a protected PDF --password PW
rotate Rotate pages --degrees 90|180|270|-90
delete Remove pages --pages
reorder Reorder pages --order "3,1,2,5,4"
metadata Read, edit, or strip metadata --title, --author, --subject, --keywords, --strip
watermark Add text watermark --opacity 0.3, --rotation 45, --font-size 48, --color R,G,B
bookmarks List document outline
flatten Flatten annotations or forms --forms, --annotations
crop Crop page margins --margins L,R,T,B
forms List, fill, or export form fields --fill "k=v,…", --export fdf|xfdf, --area x,y,w,h

23 commands total. Run pdf-oxide <command> --help for full flag documentation on any command.

Global Options

-o, --output <PATH>        Output file (defaults to stdout for text outputs)
-p, --pages <RANGE>        Page range: "1-5", "1,3,7", "1-3,7,10-12"
    --password <PW>        Password for encrypted PDFs
-v, --verbose              Show timing information
-q, --quiet                Suppress non-essential output
-j, --json                 Output as JSON
    --no-banner            Skip the REPL banner

Examples

Extract pages 1–5 as Markdown:

pdf-oxide markdown report.pdf --pages 1-5 -o report.md

Merge three PDFs:

pdf-oxide merge cover.pdf body.pdf appendix.pdf -o combined.pdf

Add a watermark:

pdf-oxide watermark contract.pdf "DRAFT" --opacity 0.2 --font-size 72

Fill form fields:

pdf-oxide forms application.pdf --fill "name=Jane Doe,date=2026-02-28" -o filled.pdf

Search with case-insensitive regex:

pdf-oxide search paper.pdf "neural.?network" -i

Render page 1 as a 300-DPI PNG:

pdf-oxide render report.pdf --dpi 300 --format png --pages 1 -o page1.png

Extract the vector path overlay from a schematic as JSON:

pdf-oxide paths schematic.pdf --format json -o paths.json

Interactive REPL

Run pdf-oxide with no arguments to enter interactive mode:

$ pdf-oxide
pdf-oxide> text /path/to/doc.pdf
(extracted text appears)
pdf-oxide> info /path/to/doc.pdf
(metadata appears)