How uglytoad/pdfpig works
PdfPig is a .NET library for reading PDF content and performing limited PDF creation. The main reading workflow opens a document, accesses pages and letters, extracts words, segments text blocks, orders them, and can export layout data; creation builds pages and writes a new PDF. The graph also preserves documented encryption support, font handling, image support, and layout/export capabilities. Some subsystems are represented by their exact enclosing source directories because their implementing files are not included in the supplied tree; unverified connections are omitted.
Main entry points: UglyToad.PdfPig Document Access · PageContentParser.cs Page Content · StringTokenizer.cs Tokenization · TrueTypeFontHandler.cs Font Parsing
Components 17
PDF Reading
- Document Access
src/UglyToad.PdfPig - Byte Input
src/UglyToad.PdfPig.Core/IInputBytes.cs - Tokenization
src/UglyToad.PdfPig.Tokenization/StringTokenizer.cs - PDF Tokens
src/UglyToad.PdfPig.Tokens/DictionaryToken.cs - Page Content
src/UglyToad.PdfPig/Parser/PageContentParser.cs
PDF Interpretation
- Decryption
src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs - Font Parsing
src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/TrueTypeFontHandler.cs - Font Formats
src/UglyToad.PdfPig.Fonts - JPEG Handling
src/UglyToad.PdfPig/Images/JpegHandler.cs
Layout Analysis
- Text Extraction
src/UglyToad.PdfPig.DocumentLayoutAnalysis/TextExtractor/ContentOrderTextExtractor.cs - Word Extraction
src/UglyToad.PdfPig.DocumentLayoutAnalysis/WordExtractor/NearestNeighbourWordExtractor.cs - Page Segmentation
src/UglyToad.PdfPig.DocumentLayoutAnalysis/PageSegmenter/DocstrumBoundingBoxes.cs - Reading Order
src/UglyToad.PdfPig.DocumentLayoutAnalysis/ReadingOrderDetector/UnsupervisedReadingOrderDetector.cs - Layout Export
src/UglyToad.PdfPig.DocumentLayoutAnalysis/Export
Creation and Export
- PDF Builder
src/UglyToad.PdfPig - PDF File
Other components
- Library User
Connections 15
- Library User → Document Access: opens
README.md - Document Access → Page Content: reads pages
- Byte Input → Tokenization: supplies bytes
src/UglyToad.PdfPig.Tokenization/StringTokenizer.cs - Tokenization → PDF Tokens: creates tokens
src/UglyToad.PdfPig.Tokenization/StringTokenizer.cs - Document Access → Decryption: supports passwords
src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs - Page Content → Font Parsing: uses font parsing
- Font Parsing → Font Formats: parses font data
src/UglyToad.PdfPig/PdfFonts/Parser/Handlers/TrueTypeFontHandler.cs - Page Content → JPEG Handling: handles JPEG
- Library User → Text Extraction: extracts text
README.md - Library User → Word Extraction: extracts words
README.md - Library User → Page Segmentation: segments words
README.md - Page Segmentation → Reading Order: orders blocks
README.md - Library User → Layout Export: exports layout
README.md - Library User → PDF Builder: creates document
README.md - PDF Builder → PDF File: writes bytes
README.md