← Back to Open-Source PDF Software

Open-Source PDF CLI Software

Standalone command-line executable, invokable from any language via a subprocess

61 tools

Command Line

Poppler

CliLibrary

PDF rendering library and command-line suite (pdftotext, pdfimages, pdftoppm, pdftocairo, pdftohtml, pdftops, pdfinfo, pdffonts, pdfdetach, pdfattach, pdfseparate, pdfunite, pdfsig) covering text/image extraction, page rendering, format conversion, metadata, attachments, and signature verification.

Command Line

Xpdf

CliGui

PDF viewer plus command-line tools (pdftotext, pdftops, pdftoppm, pdftopng, pdftohtml, pdfinfo, pdfimages, pdffonts, pdfdetach) for viewing PDFs and converting them to text, PostScript, image, or HTML, plus metadata, image, font, and attachment extraction.

Command Line

PDFtk Server

Cli

Command-line tool to merge, split, and rotate PDFs; fill forms with FDF/XFDF data and flatten them (or generate an FDF stencil); encrypt/decrypt with passwords; add watermarks/stamps; manage bookmarks, metadata, and attachments; repair damaged PDFs; and recompress page streams.

Command Line

Ghostscript

CliLibrary

PostScript and PDF interpreter/renderer from Artifex: converts PostScript/PDF to images, text, DOCX, PCL, and XPS; compresses PDFs while preserving quality; converts to/validates PDF/A; adds an OCR text layer to scanned pages; imposition (N-up), ICC color management, and ZUGFeRD/Factur-X e-invoicing support.

Command Line

MuPDF

CliGuiLibrary

Lightweight C library, viewer, and CLI toolset for PDF, XPS, and e-book formats: renders and extracts text/images/metadata/structured content; creates, splits, merges, and compresses PDFs; adds annotations (highlights, stamps, shapes); permanently redacts content; digitally signs documents; converts between PDF, SVG, PNG, HTML, and PostScript; and embeds into web pages/apps.

C

pdfroff

Cli

Wrapper script for `groff` that produces PDF documents, including support for a cover page and table of contents.

C#

Gios.PSM

CliGuiLibrary

Free, portable PDF splitting/merging utility (library, console, and GUI); also converts JPG images to PDF.

Stale
C#

PDFTK Builder

CliGui

Free GUI front-end for the PDFtk command-line tool on Windows: split, merge, stamp, add page numbers, rotate, edit metadata, bookmarks, and attachments — all via a graphical interface over PDFtk.

Stale
C++

pdftojson

Cli

Command-line tool (built on the Xpdf library) that extracts per-word text with bounding-box coordinates (top/left/width/height) from every page of a PDF and outputs it as structured JSON, along with page dimensions and page count.

Stale
C++

wkhtmltoimage

CliLibrary

Headless, command-line tool (and C library) that renders HTML into image files using the Qt WebKit rendering engine, without requiring a display server. Can capture live URLs or local HTML.

DepreciatedStale
C++

wkhtmltopdf

CliLibrary

Headless, command-line tool (and C library) that renders HTML into PDF using the Qt WebKit rendering engine, without requiring a display server. Can capture live URLs or local HTML.

DepreciatedStale
C++

diff-pdf

CliGui

Compares two PDF files and reports whether they differ (exit code, or `--output-diff` to generate a PDF highlighting visual differences); also offers a GUI mode for interactive side-by-side comparison with zoom and page-shifting to spot translation-only changes.

Go

docconv

CliDriverLibraryServer

Go library/CLI/HTTP service that converts PDF, DOC, DOCX, XML, HTML, RTF, ODT, Pages, and image files to plain text and metadata (JSON), with optional OCR support (via Tesseract, built with the `ocr` tag) for image-based input.

Stale
Go

pdfcpu

CliLibrary

Go PDF processor (CLI + library) supporting PDF up to 2.0 (ISO 32000-2): validate, optimize, split, trim, and merge PDFs; encrypt/decrypt; resize, rotate, and crop pages; extract/manipulate images, fonts, and metadata; manage attachments and portfolios; validate, report, and remove digital signatures; add/remove stamps and watermarks; process forms, bookmarks, and annotations; and generate booklets, N-up/N-down layouts, grids, and posters.

Go

Athenapdf

CliDockerServer

Docker-packaged drop-in alternative to wkhtmltopdf: a CLI (`athenapdf`, built on Electron) for direct HTML-to-PDF conversion with an 'aggressive mode' that strips page clutter, plus a `weaver` HTTP microservice (Go) for running conversions as a scalable, Kubernetes/AWS-ECS-deployable service.

DepreciatedStale
Haskell

Pandoc

Cli

Universal document converter between Markdown, HTML, LaTeX/ConTeXt, DOCX/RTF/ODT, EPUB, man/ms roff, DocBook, JATS, TEI, Jupyter notebooks, PowerPoint/reveal.js/Beamer slides, and dozens more formats. Uses external PDF-producing engines (context, latexmk, lualatex, pdflatex, xelatex, wkhtmltopdf, weasyprint, prince, pagedjs-cli, tectonic, pdfroff) to convert into PDF, and preserves metadata, footnotes, tables, math, syntax highlighting, and citations/bibliographies (via CSL) across formats.

Java

Apache Tika

CliDriverLibraryServer

Content-analysis toolkit that detects file types and extracts text and metadata from over a thousand file formats (including PDF, DOCX, PPTX, XLSX) through a single parsing interface; supports OCR (via Tesseract), language detection, named-entity recognition, and parsing of embedded documents/attachments. Available as a Java library, CLI (tika-app), or REST server (tika-server).

Java

Apache PDFBox

CliLibrary

Java library and CLI toolset covering PDF creation from scratch (with embedded fonts/images); Unicode text extraction; splitting and merging; form field extraction and filling; PDF/A-1b validation via Preflight; rendering pages to PNG/JPEG; printing via the Java printing API; and digital signing.

Java

tabula-java

CliLibrary

Table-extraction library (powers the Tabula tool) that pulls tabular data out of PDFs using lattice mode (ruled cell borders) or stream mode (no borders), exporting to CSV, TSV, or JSON; usable as a CLI for batch processing or as a Java API, with support for selective pages, custom extraction areas, and password-protected files.

Java

Docs to PDF Converter

CliLibrary

Standalone CLI tool and embeddable Java library that converts DOC, DOCX, PPT, PPTX, and ODT files to PDF without requiring LibreOffice; PPT/PPTX slides are converted to PDFs with each slide embedded as a PNG image.

DepreciatedStale
Java

veraPDF

CliLibrary

Industry-backed, open-source validation library and CLI for checking PDF files against the PDF/A and PDF/UA standards.

JavaScript

backslide

Cli

CLI tool that builds HTML slide presentations from Markdown (via Remark.js), with a live-reload dev server, Sass-based custom templates, static-site/self-contained-HTML export, presenter-notes stripping, and PDF export through DeckTape integration.

Stale
JavaScript

DeckTape

Cli

Puppeteer-based (headless Chrome) command-line tool that exports HTML slide presentations to high-quality PDF, with native support for 13 frameworks (reveal.js, impress.js, remark, Bespoke.js, deck.js, etc.) plus a generic mode for others; can also capture slides as PNG/JPG images, export slide ranges, and set PDF metadata.

JavaScript

Electron-PDF

Cli

CLI tool and Node.js API (built on Electron/Chromium) that converts URLs, HTML files, or Markdown files to PDF or PNG, with custom CSS injection, page size/orientation/margin control, print-background support, custom request headers, and batch/concurrent job handling.

JavaScript

markdown-resume.js

CliDriver

CLI tool (`md2resume`) that converts a Markdown resume into a responsive HTML page and a PDF version (via wkhtmltopdf), with a watch mode for live-reload editing and Docker support.

Stale
JavaScript

pagedjs-cli

Cli

Command line interface for Paged.js, a free and open source library that paginates content in the browser to produce print-ready PDFs from HTML/CSS.

JavaScript

pdf2json

CliLibrary

Node.js library/CLI (built on Mozilla's pdf.js engine) that converts PDFs to JSON: extracts text (with position, rotation, styling, color, and font metadata), page layout, and interactive AcroForm field data (text inputs, checkboxes, radio buttons, dropdowns, signature fields); also outputs plain-text files, and runs as a REST service or stream-based parser.

JavaScript

textract

CliDriverLibrary

Node.js module (CLI + API) that extracts text from HTML, PDF, DOC/DOCX, ODT, RTF, XLS/XLSX/XLSB/XLSM, CSV, ODS, PPTX/ODP, XML, Markdown, EPUB, and image formats (PNG/JPG/GIF via Tesseract OCR); wraps external tools (pdftotext, antiword, tesseract, unrtf) and supports password-protected PDFs and configurable OCR language.

JavaScript

pdfme

Cli

TypeScript PDF generation toolkit for Node.js and browsers: generates PDFs from simple JSON templates, includes a WYSIWYG template designer and a PDF viewer component, plus CLI tools for template validation, diagnostics, and image-based layout inspection.

LaTeX

ConTeXt

Cli

A general-purpose document processor built on top of TeX, used by pandoc as one of its PDF-producing engines.

LaTeX

latexmk

Cli

Perl script that automates the process of generating a LaTeX document by running pdflatex/xelatex/lualatex (and bibtex/makeindex) the correct number of times.

LaTeX

LuaLaTeX

Cli

TeX engine that combines LaTeX with the LuaTeX extension, allowing scripting with Lua embedded in the typesetting process.

LaTeX

pdfLaTeX

Cli

TeX engine (pdfTeX in LaTeX mode) that produces PDF output directly from LaTeX source instead of DVI, the most common default LaTeX engine.

LaTeX

XeLaTeX

Cli

TeX engine (XeTeX in LaTeX mode) with native support for Unicode and system fonts (TrueType/OpenType) via the OS's font layout engine.

Stale
OCaml

Caradoc

Cli

OCaml parser and validator for PDF file structure, with CLI analysis commands and an interactive console for exploration.

DepreciatedStale
Perl

App::pdfsize

CliDriver

Thin CLI wrapper that reports a PDF's page dimensions: extracts the first page with pdftk, converts it to JPEG via ImageMagick, then measures it with imgsize.

Stale
PHP

markdown-resume

CliDockerDriver

CLI/Docker tool that converts a Markdown resume into a responsive HTML5/CSS3 page and a PDF (via wkhtmltopdf), with selectable themes, a live-reload watch mode, word-frequency stats analysis, and single-file output with embedded styles.

Stale
PHP

PHPPdf

Cli

Converts XML (or Markdown) documents to PDF or images (JPEG/PNG via GD/Imagick/Gmagick) with HTML-like tags (div, p, table, headings, lists, images, links); supports auto-breakable/fixed pages, multi-column layouts, headers/footers/watermarks, page numbering, metadata, internal/external links, bookmarks, sticky notes, barcodes (via Zend), simple pie charts, borders, backgrounds, rotation/transparency, and stylesheets; usable via web or CLI, with Symfony2 integration.

Stale
PHP

pdf-to-text

Cli

Thin PHP wrapper around the `pdftotext` CLI binary that extracts text from a PDF, with support for a custom binary path, password-protected PDFs, and passthrough of pdftotext options (e.g. layout preservation).

Python

Code2pdf

Cli

CLI tool and Python module that converts source code files to PDF with syntax highlighting (23+ selectable style themes), optional line numbering, and configurable paper sizes (A2–A5, etc.).

Stale
Python

pdfly

Cli

Pure-Python CLI (companion to pypdf) with commands including 2-up/booklet page layout, cat (extract/merge pages), check-sign (verify signatures), compress/uncompress, extract-annotated-pages, extract-images, extract-links, extract-text, meta/pagemeta, rm (delete pages), rotate, sign, update-offsets (repair simple PDFs), and x2pdf (convert other formats to PDF pages).

Python

pdfparanoia

CliLibrary

PDF watermark-removal library/CLI targeting academic-publisher watermarks (institution names, personal identifiers, IP addresses, timestamps) for AIP, IEEE, JSTOR, RSC, and SPIE papers; also removes arbitrary user-specified strings from page content and/or XMP/DocInfo metadata, with in-place overwrite support.

Python

TextRank

Cli

Graph-based keyword/keyphrase extraction and extractive text summarization (implementing the TextRank algorithm) via `extract_summary` and `extract_phrases` CLI commands. Operates on plain text files — the README describes no PDF-specific handling.

Stale
Python

OCRmyPDF

CliDriverLibrary

Adds a searchable OCR text layer beneath page images and produces a validated PDF/A file: deskews crooked pages, optionally cleans images pre-OCR, optimizes/compresses images, recognizes 100+ languages via Tesseract, rotates misrotated pages, edits output metadata, parallelizes across CPU cores, and processes multi-thousand-page files in place.

Python

PDFx

Cli

CLI tool and Python package that extracts metadata (creation date, creator, page count, producer) and detects references (other PDFs, URLs, DOIs, arXiv IDs) within a PDF, with parallel downloading of referenced PDFs, plain-text extraction, and broken-hyperlink detection; outputs plain text or JSON, and accepts local files or URLs.

DepreciatedStale
Python

pdf2docx

CliGuiLibrary

Converts PDF files to DOCX (Word) format, preserving formatting and layout, and extracts tables; offers both CLI and GUI.

Python

Camelot

Cli

Extracts tables from text-based PDFs (not scanned documents) into pandas DataFrames, exportable to CSV/JSON/Excel/HTML/SQLite, with accuracy/whitespace quality metrics and a CLI.

DepreciatedStale
Python

PDFMathTranslate

CliDockerGuiLibraryPlugin

Translates scientific PDF documents while preserving layout, formulas, charts, tables of contents, and annotations; supports Google Translate, DeepL, Ollama, OpenAI, and other translation backends via CLI, GUI, Docker, or a Zotero plugin, with batch/directory translation and partial-document translation.

Python

MinerU

CliLibraryServerWeb App

Converts PDF, DOCX, PPTX, XLSX, images, and web pages into Markdown or JSON: strips headers/footers/page numbers while preserving structure, converts formulas to LaTeX and tables to HTML, OCRs scanned/garbled PDFs in 109 languages, handles single/multi-column and complex layouts (incl. cross-page table merging), and extracts images with captions. Offers CLI, FastAPI, and Gradio WebUI, plus Python/Go/TypeScript SDKs; builds on PDF-Extract-Kit's models.

Python

pdf-parser

Cli

Part of the Didier Stevens Suite of security tools: parses a PDF document to identify and inspect its fundamental elements/objects, with an option to search for specific strings within indirect objects — used for PDF malware analysis and forensic triage. Public domain.

Python

malicious-pdf

Cli

Generates 48+ test PDF files for security research: phone-home/callback detection, SSRF, XSS injection, NTLM credential theft via UNC paths, data exfiltration, and XXE injection, with four levels of payload obfuscation and integration with Burp Collaborator/Interact.sh. For authorized penetration testing, bug bounty research, and security product validation only.

Python

Pdfalyzer

Cli

PDF forensics/analysis tool that visualizes a PDF's internal tree-like object structure as large, color-coded diagrams, scans embedded binary streams for suspicious/malicious content using YARA rules (via the companion Yaralyzer), and force-decodes suspicious font binaries.

Python

digital-born-pdf-scanner

Cli

CLI tool that checks whether PDF files are 'born-digital' (created directly from a digital source) versus scanned images, scanning single files or whole directories (recursively) and reporting results as TSV/CSV.

Stale
Ruby

Docsplit

CliLibrary

CLI utility and Ruby library that extracts searchable UTF-8 plain text from documents, generates page images and thumbnails in any format, splits documents into single-page or full PDFs, and extracts metadata (title, author, page count).

Ruby

Kitabu

CliDriver

Ruby framework that converts Markdown (with ERB templating) into PDF (via Prince XML), EPUB, Mobi, and HTML e-books: auto-generated tables of contents from headings, Rouge syntax highlighting, custom @font-face fonts, book-layout stylesheets per format, frontmatter metadata/variables, and pre/post-render content hooks.

Ruby

HexaPDF

CliLibrary

PDF library and CLI (positioned as a pdftk/Poppler-utils alternative): creates PDFs from scratch with vector drawing, JPEG/PNG/PDF image embedding, and TrueType text with subsetting; a high-level document composition engine (automatic layout, text flow, page breaks, lists, multi-column, reusable styles); modifies and merges existing PDFs; creates AcroForms with Adobe-like appearances; adds annotations, outlines, and file attachments; extracts metadata/text/images/files; encrypts (incl. PDF 2.0 AES-256) and digitally signs; and optimizes file size with object validation.

Ruby

Gimli

CliDockerDriver

CLI tool that converts GitHub-Markup-supported markup files (Markdown, Textile, etc., except roff) to PDF via wkhtmltopdf: embeds images (local/relative/remote), CodeRay syntax highlighting with a GitHub theme, custom CSS, Jekyll front-matter stripping, cover-page generation, direct wkhtmltopdf option passthrough (TOC, page numbering), and Docker support.

Stale
Ruby

InvoicePrinter

CliLibraryServer

Pure-Ruby (no external system libraries) invoice-PDF generator, usable as a library, CLI, or server: A4/US Letter formats, purchaser/provider info boxes with addresses and tax IDs, SWIFT/IBAN payment details, itemized tables (description/quantity/price/tax/totals), automatic page numbering, customizable labels, custom fonts/logos/backgrounds/stamps/signatures/QR codes, and JSON-driven invoice data — fast enough for real-time request handling.

Ruby

Asciidoctor PDF

Cli

Native PDF converter for AsciiDoc (the `pdf` Asciidoctor backend), converting directly to PDF without an intermediate DocBook/LaTeX step: style/layout control via YAML theme files, syntax highlighting, tables, images, and SVG. Built on the Prawn gem and its extensions (prawn-svg, prawn-table, prawn-icon).

Ruby

Origami

Cli

Pure-Ruby framework for parsing, modifying, and creating PDF files, with lazy on-demand parsing: compression filters with predictors, RC4/AES encryption (including Revision 6), digital signatures and usage rights, file attachments, AcroForm/XFA forms, and object streams. Ships CLI tools including `pdfcop` for detecting dangerous PDF content (not a full malware-analysis/forensics suite by the author's own description) plus decompression, decryption, encryption, resource-extraction, and metadata-inspection utilities.

Stale
Rust

Tectonic

Cli

Modernized, complete, self-contained TeX/LaTeX engine powered by XeTeX and TeXLive, used by pandoc as one of its PDF-producing engines.