← Back to Open-Source PDF Software

Open-Source Ruby PDF Software

23 open-source PDF tools written in Ruby.

Ruby

Wicked PDF

DriverLibraryPlugin

Rails plugin that uses wkhtmltopdf to render standard HTML views (or raw HTML/URLs/files) as PDF, avoiding a specialized PDF DSL: `format.pdf` controller responses, saving/emailing PDFs, CSS styling and JS execution, custom headers/footers, Rack middleware for `.pdf`-suffixed URLs, and an HTML debug-preview mode.

Ruby

PDFKit

DriverLibrary

Ruby gem that generates PDFs from HTML+CSS via wkhtmltopdf (WebKit rendering): converts HTML strings, URLs, or files; attaches stylesheets; passes cookies; configures default/global wkhtmltopdf options; and provides Rack/Rails middleware for `.pdf`-suffixed routes with forced-download support.

Stale
Ruby

Prawn

Library

Pure-Ruby PDF generation library: vector drawing (lines, polygons, curves, ellipses); flowing text with inline formatting, builtin/embedded TrueType fonts, UTF-8, RTL, and fallback fonts; PNG/JPG image embedding; a basic grid layout system; encryption and password protection; repeatable headers/footers/page numbers; PDF outlines; and low-level PDF object access for extensions. Explicitly not an HTML-to-PDF generator, though it offers limited inline styling.

Ruby

Grover

DriverLibraryPlugin

Ruby gem that uses Puppeteer/headless Chromium (or Firefox) to convert URLs, inline HTML, local files, or Rails view templates into PDF, PNG, or JPEG: configurable page layout/margins/viewport, cookies/headers, CSS/JS injection, cover pages, HTTP basic auth, remote-browser connections, wait conditions (network idle, element visibility), and Rack middleware for URL-extension-triggered conversion.

Ruby

FerrumPdf

Library

Rails-oriented gem (headless Chrome via Ferrum, no Node.js dependency) that renders HTML/URLs to PDF (`render ferrum_pdf: {}`) with paper size/margin/orientation/scale options and dynamic headers/footers, or captures PNG/JPEG screenshots (`render ferrum_screenshot: {}`) of the full page, viewport, or a CSS-selected element.

Ruby

PDF::Reader

Library

Low-level Ruby library for programmatic PDF access (not a renderer): document version, metadata/info, and page count; per-page text and font extraction; raw page content access; direct PDF object access via ObjectHash; custom receiver objects to walk page rendering programs; UTF-8 text normalization; and Ascii85 stream decoding.

Ruby

RGhost

Library

Ghostscript-based document API that generates documents programmatically and converts between PDF, PS, GIF, TIF, PNG, and JPG, with support for EPS templates and optimizations for handling large documents.

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

Yomu

Library

Ruby library built on Apache Tika that extracts text, metadata (as a hash, e.g. Content-Type), and MIME type from PDFs, Microsoft Office, OpenDocument, Apple iWork, and RTF files; accepts local paths, remote URLs, streams, or raw binary data as input.

Stale
Ruby

pdf-extract

Library

Tool and library for extracting distinct text areas from PDFs, particularly scholarly article PDFs (e.g. isolating body text, references, headers from the rest of the document).

DepreciatedStale
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

PDF::Inspector

Library

PDF::Reader-based analysis library (built primarily to support Prawn's test suite, but usable on any PDF) that extracts text as an array of per-operation string fragments and counts document pages.

Ruby

Princely

Library

Rails wrapper around the PrinceXML PDF generator: renders PDF templates via a `:pdf` render option, registers PDF as a respond_to MIME type, provides a `make_and_send_pdf` helper, and supports custom layouts/stylesheets/locals, asset path rewriting, inline/attachment disposition, JS and PDF-form flags, and configurable timeouts.

Ruby

Grim

Library

Ruby gem (using ImageMagick and Ghostscript) that extracts a PDF page as an image (e.g. PNG) or as page text, reports total page count, and iterates all pages in batch, with configurable image width/density/quality/colorspace/alpha and custom processor paths.

Stale
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

CombinePDF

Library

Pure-Ruby (no external dependencies) library to merge PDFs, extract and recombine specific pages, overlay watermarks/stamps (e.g. logos), and add customizable page numbering; parses PDFs from files, memory, or remote sources. The maintainer has stepped back from active maintenance and is seeking a new steward.

Depreciated
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
Ruby

squid

Library

Extends the Prawn PDF library with a `chart()` method for drawing bar/line/other graphs directly into PDF documents from hash-based data.

Stale
Ruby

gambas

Library

Rails gem that renders inline PDFs from normal Rails view templates (`.pdf.prawn` / `.pdf.erb`) using the Prawn library, exposing a `pdf` object in views with global or per-document configuration and metadata (title, author, page size).

Stale
Ruby

Ruby/Poppler

BindingsLibrary

Ruby-GNOME project's binding of poppler-glib, exposing Poppler's PDF rendering/parsing capabilities (text/image extraction, rendering, metadata) to Ruby. Requires the system poppler-glib library.