# hayro

> A set of Rust crates for parsing, interpreting and rendering PDF files.

Source: https://talira.ai/catalog/hayro-aqyrj3a8
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [documents / pdf / rendering](https://talira.ai/categories/documents/pdf/rendering), [languages / rust](https://talira.ai/categories/languages/rust)
- Platforms: web[^4]
- Licence: Apache-2.0 OR MIT[^2][^3]
- Pricing: Free and open source[^1][^2]
- Free tier: yes[^1][^2]
- Self-hostable: yes[^1]
- Creator: Laurenz Stampfl (LaurenzV)

hayro is a family of pure-Rust crates for reading PDFs: hayro-syntax parses them read-only, hayro-interpret runs their content streams into an abstract device, hayro rasterizes pages to bitmaps on the CPU and hayro-svg converts pages to SVG. Image decoders for JPEG 2000, JBIG2 and CCITT, and font and CMap parsers, are separate crates that can be used on their own. Its author describes it as the most correct PDF renderer in Rust, checked by a visual regression suite of over 1,600 PDFs largely taken from the pdf.js and PDFBox test suites; it doesn't edit documents.

## Links

- GitHub: https://github.com/LaurenzV/hayro
- Docs: https://docs.rs/hayro

## Problems it solves

- render PDF pages to images in pure Rust without poppler
- make PNG thumbnails of uploaded PDFs without shipping a C library or a GPL tool
- convert PDF pages to SVG from a Rust program
- parse a PDF quickly and read-only without building an editable document model
- decode JPEG 2000 or JBIG2 images embedded in scanned PDFs in Rust
- pdfium bindings make our Rust build and deployment painful across platforms
- render untrusted PDFs with no unsafe code in the renderer
- show previews of PDF pages in a WebAssembly app
- walk the drawing operations on a PDF page to extract text positions or paths
- rasterize PDFs on a server with no GPU

## Features

- read-only PDF parsing (hayro-syntax)
- content stream interpreter with an abstract device (hayro-interpret)
- CPU rasterization to bitmaps (hayro)
- PDF to SVG (hayro-svg)
- standalone JPEG 2000, JBIG2 and CCITT decoders
- font and CMap parsers
- embedded standard fonts and CMaps (default features)
- 1,600+ PDF visual regression suite
- unsafe code forbidden in the hayro crate
- online demo viewer

## Trust

Overall: 0.62 out of 1.
Signals: maintenance 1.00, adoption 0.59, momentum 0.50, community 0.68, backing 0.20, extensibility 0.00.

- last commit 9 days ago
- 322 commits in the last 90 days
- latest release hayro-v0.9.0 21 days ago
- 868 GitHub stars
- 48 contributors
- created by Laurenz Stampfl (LaurenzV)

## Alternatives

- [pdfium-render](https://talira.ai/catalog/pdfium-render-yyd0t2g5.md): A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project.
- [MuPDF](https://talira.ai/catalog/mupdf-a0hpyn67.md): The ultimate library for managing PDF documents
- [pdf-rs](https://talira.ai/catalog/pdf-rs-p2j8k7qt.md): Rust library to read, manipulate and write PDF files.
- [PDF.js](https://talira.ai/catalog/pdf-js-ce376y3j.md): PDF Reader in JavaScript
- [PyMuPDF](https://talira.ai/catalog/pymupdf-xw9pb5xf.md): A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.

## Sources

[^1]: https://github.com/LaurenzV/hayro (checked 17 Nov 2026)
[^2]: https://github.com/LaurenzV/hayro/blob/main/LICENSE-MIT (checked 17 Nov 2026)
[^3]: https://docs.rs/hayro (checked 17 Nov 2026)
[^4]: https://laurenzv.github.io/hayro/ (checked 17 Nov 2026)
