# Prawn

> Pure Ruby library for generating PDFs from code

Source: https://talira.ai/catalog/prawn-ez1y8hgw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [documents / pdf / generation](https://talira.ai/categories/documents/pdf/generation), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Platforms: linux, macos, windows
- Licence: Ruby OR GPL-2.0-only OR GPL-3.0-only
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Plugins: yes
- Creator: Gregory Brown

Prawn is a pure Ruby library for generating PDFs in code: vector drawing, flowing text with limited inline formatting, PDF built-in and embedded TrueType fonts, PNG and JPG images, a simple grid for layout, repeating headers, footers and page numbers, outlines, and encryption with passwords. Its internationalization covers UTF-8 fonts, right-to-left text and fallback fonts, and you can drop down to the PDF object tree for custom extensions. It isn't, and won't be, an HTML to PDF converter.

## Links

- Website: https://prawnpdf.org
- GitHub: https://github.com/prawnpdf/prawn
- Docs: https://prawnpdf.org/manual.pdf

## Problems it solves

- generate invoices as PDFs from Ruby without a headless browser
- draw text, lines and images at exact positions on a PDF page
- build a PDF report in Ruby with headers, footers and page numbers
- write Arabic or Hebrew right-to-left text into a generated PDF
- embed a TrueType font so special characters render in the PDF
- password-protect a PDF we generate
- a pure Ruby PDF writer with no native dependencies
- add a bookmarks outline to a generated PDF

## Features

- vector drawing
- flowing text with inline formatting
- built-in and embedded TrueType fonts
- PNG and JPG images
- grid layout
- repeating headers, footers and page numbers
- outlines
- encryption and passwords
- UTF-8, right-to-left text and fallback fonts
- low-level PDF object access

## Capabilities

- Takes plugins: plan not known

## Trust

Overall: 0.42 out of 1.
Signals: maintenance 0.27, adoption 0.74, momentum 0.41, community 0.92, backing 0.20, extensibility 0.20.

- latest release 2.3.0 6.3 years ago
- 4.8k GitHub stars
- 197 contributors
- created by Gregory Brown
- has a plugin system

Warnings:

- last commit 7 months ago

## Alternatives

- [HexaPDF](https://talira.ai/catalog/hexapdf-0yspeq5s.md): Versatile PDF creation and manipulation for Ruby
- [PDFKit](https://talira.ai/catalog/pdfkit-2tzqj5bd.md): A JavaScript PDF generation library for Node and the browser.
- [ReportLab](https://talira.ai/catalog/reportlab-389sa2r4.md): The print button for eBusiness
- [ironpress](https://talira.ai/catalog/ironpress-g94sb527.md): HTML to PDF. In process. In pure Rust.
- [PDFMonkey](https://talira.ai/catalog/pdfmonkey-g92tp6gk.md): PDF Generator API with a visual template builder
- [DocSpring](https://talira.ai/catalog/docspring-kjdwby1j.md): Fill PDF forms, generate PDFs and Word documents, and collect e-signatures with one API.
