# pdf-reader

> A PDF parser conforming as much as possible to the PDF specification from Adobe

Source: https://talira.ai/catalog/pdf-reader-4twjxc38
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [documents / pdf / extraction](https://talira.ai/categories/documents/pdf/extraction), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Platforms: linux, macos, windows
- Licence: MIT
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Creator: James Healy (yob)

PDF::Reader is a Ruby library that parses PDF files and gives programmatic access to what's inside: document info and metadata, page count, bookmarks, each page's text, and the raw objects and content streams for anything else. It's a low-level foundation for higher-level tools, not a renderer, with text extraction as the main convenience. It follows the PDF 1.7 specification as far as it can and asks for files that break it.

## Links

- GitHub: https://github.com/yob/pdf-reader
- Docs: https://www.rubydoc.info/gems/pdf-reader

## Problems it solves

- extract the text from each page of a PDF in Ruby
- read a PDF's page count and metadata in my Rails app
- check that a PDF we generated contains the right text in a test
- walk the raw objects of a PDF to find out why it's broken
- read the content stream of a page to find where text is drawn
- parse a PDF in pure Ruby without installing poppler

## Features

- text extraction per page
- metadata, info and page count
- bookmarks
- raw object access
- content stream callbacks
- IO streams or files

## Trust

Overall: 0.43 out of 1.
Signals: maintenance 0.46, adoption 0.66, momentum 0.30, community 0.77, backing 0.20, extensibility 0.00.

- last commit 31 days ago
- 2 commits in the last 90 days
- 1.9k GitHub stars
- 82 contributors
- created by James Healy (yob)

## Alternatives

- [HexaPDF](https://talira.ai/catalog/hexapdf-0yspeq5s.md): Versatile PDF creation and manipulation for Ruby
- [pdfplumber](https://talira.ai/catalog/pdfplumber-phcpd0sv.md): Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.
- [PyMuPDF](https://talira.ai/catalog/pymupdf-xw9pb5xf.md): A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
- [Azure Document Intelligence](https://talira.ai/catalog/azure-document-intelligence-av8rahnm.md): Extract document text, structure, and fields with AI models
