README
View Source
Native Elixir PDF Utilities
Native Elixir PDF Utilities is a small library for developers who need practical PDF building blocks without command line tools.
PDFs are useful, awkward, and full of edge cases. This project focuses on the common structural work that Elixir applications often need: reading PDF bytes, understanding the object stream, extracting embedded text when it is available, and combining documents in a predictable way.
The goal is not to be a full PDF engine overnight. It is a steadily improving toolkit, handled by an excited developer who wants this to become a dependable native Elixir option for day-to-day PDF utility work.
Package and Docs
- Package: https://hex.pm/packages/native_elixir_pdf_utilities
- API docs: https://native-elixir-pdf-utilities.hexdocs.pm/api-reference.html
What It Does
- Tokenizer - turns PDF byte streams into structured Elixir tokens.
- Merger - combines multiple PDF binaries into a fresh PDF with rewritten object references.
- Reader and text extraction - strictly resolve embedded Unicode text from classic and modern PDFs.
- HTML to PDF - renders a strict, document-oriented HTML/CSS subset to native PDF bytes without Chromium, wkhtmltopdf, Node, Rust, Python, OS packages, or SaaS calls.
See the documentation for feature guides and quick reference.
Installation
def deps do
[
{:native_elixir_pdf_utilities, "~> 0.6.0"}
]
endDevelopment
Run the project checks before contributing:
mise exec -- mix test
MIX_ENV=test mise exec -- mix dialyzer
mise exec -- mix format
For HTML/CSS to PDF changes, also open representative rendered PDFs and compare layout visually across single-page, multi-page, table, flexbox, grid, image, and embedded-font examples.
License
MIT. See LICENSE.