Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Elixir
  3. chromic_pdf

chromic_pdf

Apache-2.0Elixir

An Elixir library for HTML to PDF/A conversion using headless Chrome and Ghostscript without Node.js.

GitHubGitHub
482 stars42 forks0 contributors

What is chromic_pdf?

ChromicPDF is an HTML-to-PDF renderer for Elixir applications that uses headless Chrome's DevTools API for direct communication. It generates PDFs from HTML sources without requiring Node.js, offering features like custom headers/footers, PDF/A conversion via Ghostscript, and multi-source concatenation. It provides a high-performance, Elixir-native alternative to Node.js-based solutions like Puppeteer.

Target Audience

Elixir developers building applications that require reliable, high-performance PDF generation from HTML, such as reporting systems, invoice generators, or document export features. It is particularly suited for teams wanting to avoid Node.js dependencies in their Elixir stack.

Value Proposition

Developers choose ChromicPDF for its direct integration with Chrome's DevTools API, eliminating the need for Node.js or Puppeteer while maintaining or improving performance. Its unique selling points include native Elixir supervision tree integration, support for PDF/A compliance with Ghostscript, and advanced features like header/footer templates and multi-source concatenation.

Overview

Convenient HTML to PDF/A rendering library for Elixir based on Chrome & Ghostscript

Use Cases

Best For

  • Generating PDF reports from HTML templates in Elixir web applications like Phoenix.
  • Creating PDF/A-compliant documents for archival or regulatory requirements in Elixir systems.
  • Combining multiple HTML sources into a single PDF without external Node.js dependencies.
  • Adding custom headers and footers to PDFs using HTML templates in Elixir projects.
  • Building invoice or document generation features in Elixir with precise layout control via the Template API.
  • Integrating PDF generation into Elixir supervision trees for robustness and scalability.

Not Ideal For

  • Environments without headless Chrome installed, such as serverless or restricted container setups.
  • Projects needing PDF/A compliance without the ability to install Ghostscript due to system constraints.
  • Teams with existing Node.js workflows who prefer Puppeteer for its broader ecosystem and community support.
  • Simple PDF generation tasks where the overhead of managing Chrome processes outweighs the benefits.

Pros & Cons

Pros

Node-Free Architecture

Communicates directly with Chrome's DevTools API via pipes, eliminating Node.js dependencies while maintaining or improving performance, as highlighted in the README's comparison to puppeteer.

Advanced PDF Features

Supports custom HTML headers and footers using Chrome's full printToPDF options and enables PDF/A conversion with Ghostscript, validated by verapdf for compliance.

Elixir-Native Integration

Designed as a supervision tree that integrates smoothly into Elixir applications, providing robustness and scalability without external runtime dependencies.

Multi-Source Concatenation

Allows automatic concatenation of multiple HTML sources into a single PDF using Ghostscript, useful for assembling complex documents from disparate parts.

Cons

External Dependencies Burden

Requires headless Chrome and optionally Ghostscript, adding deployment complexity and potential environment setup hurdles, especially in containerized or restricted systems.

Outdated Examples

The README admits the Phoenix integration example is outdated, which may hinder developers seeking modern, ready-to-use implementations for common web frameworks.

Performance Overhead Risk

Chrome process startup and management can introduce latency, making it less ideal for real-time or extremely high-volume PDF generation scenarios without careful tuning.

Frequently Asked Questions

Quick Stats

Stars482
Forks42
Contributors0
Open Issues8
Last commit3 months ago
CreatedSince 2020

Tags

#elixir#html-to-pdf#pdf-a#library#headless-chrome#ghostscript#printing#chrome-headless#chrome-devtools#pdf-generation#pdf-converter#invoice#pdf

Built With

E
Elixir
G
Ghostscript

Included in

Elixir13.1k
Auto-fetched 7 hours ago

Related Projects

pdf_generatorpdf_generator

Create PDFs with wkhtmltopdf or puppeteer/chromium from Elixir.

Stars343
Forks71
Last commit3 years ago
gutenexgutenex

Native PDF generation for Elixir

Stars245
Forks38
Last commit7 years ago
puppeteer_pdfpuppeteer_pdf

PDF generation wrapper for Elixir using Puppeteer

Stars98
Forks18
Last commit6 years ago
pdf2htmlexpdf2htmlex

Convert PDF docs to beautiful HTML files without losing text or format.

Stars92
Forks18
Last commit10 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub