An Elixir wrapper for generating PDFs from HTML using wkhtmltopdf or Chrome/Chromium via Puppeteer.
PDF Generator is an Elixir library that creates PDF documents from HTML content. It wraps either wkhtmltopdf or Chrome/Chromium via Puppeteer to handle the actual PDF rendering, providing a consistent Elixir API for both engines. It solves the problem of programmatically generating PDFs within Elixir applications, whether for reports, invoices, or other document needs.
Elixir developers who need to generate PDFs from HTML in their applications, particularly those working on web applications, reporting systems, or document automation tools.
Developers choose PDF Generator because it offers a clean, idiomatic Elixir interface to two robust PDF rendering engines, eliminating the need to directly manage shell commands or external dependencies. Its flexibility in deployment (system binaries or embedded Chromium) and support for advanced features like PDF encryption make it a comprehensive solution.
Create PDFs with wkhtmltopdf or puppeteer/chromium from Elixir.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows switching between wkhtmltopdf for smaller file sizes and Chrome for modern CSS/JavaScript rendering, providing flexibility based on use case, as highlighted in the dual engine support feature.
Integrates with PDFTK to enable password protection and edit permissions, adding security features to generated PDFs, as described in the encryption options.
Supports both system-installed binaries and embedded Chromium, making it suitable for various environments including portable releases, as noted in the deployment section.
Includes configuration for running in Docker, such as the no_sandbox option for Chrome, easing containerized deployment, as explained in the Docker-friendly setup.
Embedding Chromium adds a 300 MB binary to the application, significantly increasing release size, which the README explicitly warns about.
Requires installation and management of multiple external tools like wkhtmltopdf, NodeJS, Chrome, and PDFTK, leading to potential compatibility and installation hurdles.
The author admits to 'bad Makefile skills' causing frequent recompilations in development, which can slow down workflow and introduce frustration.
As a wrapper library, it may not expose all advanced features of the underlying engines, limiting customization for edge cases beyond the provided API.