# UglyToad/PdfPig

Read and extract text and other content from PDFs in C# (port of PDFBox)

Repository: https://github.com/UglyToad/PdfPig
Canonical: https://ross.abutalabs.com/products/pdfpig
Homepage: https://github.com/UglyToad/PdfPig/wiki
Language: C#
License: Apache-2.0
License Family: permissive
Topics: pdfbox, pdf, pdf-document, csharp, netstandard, pdf-extractor, pdf-document-processor, pdf-files, alto-xml, hocr, layout-analysis, document-analysis, page-xml, pdf-generation
Last push: 2026-08-26T17:44:21+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 75, longevity 100
- inputs: {"age_days": 3219, "days_push": 7, "days_rel": 11, "gap_med": 94, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2549, forks 331 (observed 2026-08-28T04:07:00.412552+00:00)

## What it is
PdfPig is a C#/.NET library for reading and extracting text, images, annotations, forms, and metadata from PDF files, ported from Apache PDFBox. It also provides document layout analysis tools and basic PDF creation capabilities.

## Use cases
- extract text from pdf files in c#
- parse pdf documents in .net
- get word positions and letters from a pdf
- extract images from pdf pages
- read pdf forms and annotations
- perform document layout analysis on pdfs
- export pdf page content to alto or hocr
- create simple pdf documents programmatically

## When to choose
- you need a permissive Apache-2.0 alternative to iText 7 (AGPL) or commercial libraries like SpirePDF
- you need letter-level position and size data for layout analysis
- you work in .NET and need PDF text/content extraction without native dependencies
- you need to read encrypted PDFs with a password

## When to avoid
- you need to extract tables directly (use Tabula Sharp or Camelot Sharp instead)
- you need to convert HTML or other formats to PDF
- you need to fill or modify PDF form values (forms are read-only)
- you need advanced PDF generation features beyond basic text and paths

## Facets
- artifact type: library
- maturity: active
- function: parser, pdf, ocr, image-processing, pdf-viewer
- domain: pdf, files, developer-tools
- platform: dotnet, cross-platform, windows
- tags: pdfbox-port, text-extraction, layout-analysis, document-processing, csharp, netstandard, alto-xml, hocr, pagexml, natural-language-processing, linux, macos

## Member repositories
- UglyToad/PdfPig (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:00.412552+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:23:59.833930+00:00, confidence not recorded.
  - readme: https://github.com/UglyToad/PdfPig (fetched 2026-08-28T04:07:00.412552+00:00, sha f9d693d93f47)
  - homepage: https://github.com/UglyToad/PdfPig/wiki (fetched 2026-08-29T10:06:35.220220+00:00, sha d83b9cad1285)
- Data as of 2026-08-30T08:39:29.467469+00:00.
