Skip to content
Docs: Hypapdf documentationMenu

Hypapdf documentation

Hypapdf reads PDFs in .NET: text, words and reading order, form fields, images, bookmarks and links, with no dependencies. Start here.

v0.1.0Last updated View as Markdown

Hypapdf is a fast, dependency-free PDF reader for .NET by vensas GmbH. It opens PDFs, exposes their structure and metadata, decodes streams and extracts text, words and reading order, form fields, images, bookmarks and links. It is safe for untrusted input and thread-safe, so pages can be read in parallel.

The current version is 0.1.0, published on NuGet as Hypapdf for .NET 8, 9, 10 and 11. See Getting started to install it.

When to use it#

  • Index or search PDFs (document stores, RAG pipelines, e-discovery): extract the text of many documents quickly.
  • Read invoices, forms and reports in a web service: text, filled-in form fields, metadata, page geometry.
  • Inspect PDFs: page count, version, encryption, the raw object model and decoded streams.

Hypapdf reads; it does not render, edit or write PDFs, and it does not run OCR on scanned pages.

How it works#

Hypapdf keeps the file in memory and parses it lazily, straight from bytes. Opening a document reads only the cross-reference data. Pages, fonts and streams are parsed the first time you use them, and page content is inflated into pooled buffers that are released after each page.

 PDF bytes ──▶ ▓▓▓ xref ──▶ ▒▒▒ page content (inflated into pooled buffers) ──▶ ░░░ text, words, fields, images
               on open        on first use, per page, on any thread

Because pages are independent and the document is thread-safe, ExtractText can spread the pages over every core. Performance explains where the speed comes from.

What you can read#

  • Text in content order (like pdftotext -raw) or in reading order for multi-column pages, and every glyph with its position, size and font.
  • Layout: words, lines and blocks with bounding boxes, font and rotation.
  • Forms: AcroForm fields with their names, types, values, options and widgets.
  • Images: the images drawn on each page, as stored (JPEG, JPEG 2000) or converted to PNG.
  • Navigation: the bookmark tree and link annotations with resolved destinations.
  • Metadata: document information, XMP, version, encryption and permissions.
  • Object model: dictionaries, arrays, streams and references, with decoded and raw stream bytes.

Next steps#