Skip to content
CAI
Software that uses CAICheck a score

bitcrowd/chromic_pdf

62.2

Adequate · 3 October 2026

3.7k

lines of production code

Elixir

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

ChromicPDF is an Elixir library that generates PDFs and screenshots by controlling Chromium instances. It manages browser sessions through configurable, named connection pools and supports both local and remote Chrome connections via WebSocket. The system also handles PDF/A conversion using Ghostscript and provides a composable protocol DSL for granular browser automation.

Features

Add Chrome warm-up task and expand documentation

A new Mix task, \ChromicPdf.WarmUp\, is introduced to launch a one-off Chrome process that initializes caches, helping to mitigate timeout errors in CI environments during the first DevTools commands. The library's documentation has been significantly expanded to cover HTML-to-PDF/A rendering via Ghostscript, detailed security considerations (including architectural isolation, script disabling, offline mode, and sandbox configuration for Docker), and granular session pool settings such as operation timeouts, checkout timeouts, and named session pools.

lib · high confidence

Add project branding assets

The assets directory now includes a new icon (icon.svg), a logo with text (logo.svg), and a copyright notice file (COPYRIGHT). These files provide the visual identity assets for the project, including handcrafted SVG graphics and attribution for the font and rendering tools used.

assets · high confidence

Behavioural changes

ChromicPDF API restructured with new modules and Plug support

The library's internal architecture has been refactored: the monolithic \Processor\ and \Session\ modules are replaced by a new \ChromicPDF.API\ module that handles PDF and screenshot generation, while \ChromicPDF.Plug\ provides a mechanism to forward HTTP requests from Chrome to the caller process for dynamic content rendering. Error handling is improved with a dedicated \ChromicPDF.ChromeError\ exception that provides contextual hints for issues like network disconnections or certificate errors, and \ChromicPDF.Telemetry\ is added to instrument operations. The \ChromicPDF.Template\ module is retained to help with page styling and layout.

_lib/chromic\pdf · high confidence

Initial configuration for Chromic PDF

A new configuration file (config/config.exs) has been added to the project, establishing default settings for the Chromic PDF library. By default, protocol debugging is disabled, but in development and test environments, the worker pool size is explicitly set to 1 to optimize resource usage during those phases.

config · high confidence

License changed to Apache-2.0 and project structure updated

The project license has been switched to Apache-2.0, replacing the previous license with a new LICENSE file. The project structure has been updated to include a \.tool-versions\ file locking Elixir 1.14.5 and Erlang 25.3.1, and the \.dialyzer\_ignore.exs\ file has been removed. The README has been significantly rewritten to reflect the current API, including new usage examples for the Template API and multiple sources, and badges have been added. The \.gitignore\ and \.formatter.exs\ files have also been updated to reflect current development practices.

(repo-wide) · high confidence

PDF/A asset relocation and metadata extraction adjustment

PDF/A-related assets have been moved to the /priv directory to support release packaging, including the addition of a blank.html file and the relocation of pdfinfo.ps. Additionally, the PostScript script used for extracting PDF metadata has been modified to comment out the extraction of the Producer field, meaning this specific metadata will no longer be included in the output.

priv · high confidence

Refactored PDF/A conversion to use a dedicated Ghostscript worker pool

The PDF/A conversion logic has been restructured to use a new \GhostscriptPool\ backed by \NimblePool\, replacing the previous implementation. This change introduces a dedicated worker module (\GhostscriptWorker\) and a runner (\GhostscriptRunner\) that handles Ghostscript command-line construction, including version-specific safety flags (like \-dSAFER\ and \-dNEWPDF=false\) and ICC profile embedding via a new PostScript definition file (\PDFA\_def.ps.eex\). Users benefit from more robust PDF/A-3 generation with proper metadata handling and improved concurrency management for Ghostscript processes.

_lib/chromic\pdf/pdfa · high confidence

Refactored browser management and Chrome connection architecture

The library has been restructured to use a new \ChromicPDF.Browser\ supervisor that manages named session pools and a dedicated \Channel\ for communication, replacing the previous connection model. This change introduces a configurable \no\_sandbox\ option (defaulting to false) for Chrome startup, allowing users to explicitly control sandboxing behavior. Additionally, the connection layer now supports remote Chrome instances via a \:chrome\_address\ option (requiring the \websockex\ dependency) alongside the existing local pipe-based connection, and includes a \warm\_up/1\ function to pre-initialize Chrome processes.

_lib/chromic\pdf/pdf · high confidence

Refactored browser session management with configurable timeouts and named pools

The browser session pool implementation has been refactored to support named session pools and more granular timeout configuration. Users can now define multiple pools with distinct settings (e.g., different sizes or timeouts) via a map in the \:session\_pool\ configuration, while global defaults still apply to unnamed pools. New options include \:init\_timeout\ for Chrome initialization delays and \:checkout\_timeout\ for acquiring a worker, replacing the previous single timeout model. Additionally, the \:max\_session\_uses\ option is deprecated in favor of \:max\_uses\, and the underlying pool mechanism has switched from poolboy to NimblePool for better reliability and error handling.

_lib/chromic\pdf/pdf/browser · high confidence

Refactored connection strategy to support local and remote Chromium instances

The library now uses a pluggable connection strategy, allowing users to connect to a Chromium instance running locally via a port or remotely via a WebSocket debugger URL. This change introduces new modules (\ChromicPDF.Connection.Local\, \ChromicPDF.Connection.Inet\, and \ChromicPDF.Connection.Tokenizer\) to handle these distinct communication methods, replacing the previous single-connection approach. It also adds a specific \ConnectionLostError\ exception to provide clearer diagnostics when the Chrome process stops unexpectedly.

_lib/chromic\pdf/pdf/connection · high confidence

Refactored protocol definitions into modular, composable steps

The protocol implementation in lib/chromic\_pdf/pdf/protocols has been restructured from a monolithic structure into distinct, reusable modules (ChromicPDF.Navigate, ChromicPDF.PrintToPDF, ChromicPDF.CaptureScreenshot, ChromicPDF.SpawnSession, ChromicPDF.ResetTarget, and ChromicPDF.CloseTarget). This change introduces a step-based DSL that allows complex browser operations to be composed of smaller, shared fragments. For users, this enables more granular control over browser sessions and page interactions, such as configuring offline modes, disabling scripts, or handling runtime exceptions during session spawning, and supports new capabilities like full-page screenshot capture and timezone overrides through specific protocol steps.

_lib/chromic\pdf/pdf/protocols · high confidence

Test coverage

Added integration test fixtures for ZUGFeRD and browser testing; Added integration test support infrastructure; Added unit tests for ChromeRunner, Tokenizer, Protocol inspection, and Utils; Configured test suite to skip optional tool-dependent tests; Expanded integration test coverage for core ChromicPDF capabilities.

Dependencies

Upgrade to version 1.17.1 with dependency and platform updates

This release bumps the library to version 1.17.1 and raises the minimum required Elixir version to 1.12. It replaces the legacy \poolboy\ dependency with \nimble\_pool\ for connection pooling and adds optional support for \plug\, \plug\_crypto\, \phoenix\_html\, \telemetry\, and \websockex\. The test server has switched from \plug\_cowboy\ to \bandit\, and development tooling dependencies like \credo\, \dialyxir\, and \ex\_doc\ have been updated to their latest compatible versions.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 63 → 62 (-1.3)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 95 → 96 (+1.3)
  • Maturity 52 → 51 (-0.7)
  • Readiness 66 → 68 (+2.5)
  • Security 69 → 62 (-7.1)

Resolved (1)

  • Documentation: no usage examples (.github/docker/README.md)

New (3)

  • End-of-life runtime: Elixir 1.14
  • End-of-life runtime: Erlang/OTP 25
  • Orphaned knowledge (lib/chromic_pdf/supervisor.ex)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

bitcrowd/chromic_pdf was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 61086f081377ae46ed79ea7f8c3ae466392d2acb — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.