This repository is a mature Ruby gem (`pdf-reader`) that provides a comprehensive PDF parsing library. It implements a low-level PDF parser conforming to the PDF specification, enabling programmatic access to PDF content without rendering. The library supports text extraction (with UTF-8 conversion), metadata retrieval, page geometry, font handling (Type1, TrueType, Type3, CID), encryption (RC4, AES), and various PDF features like Form XObjects, inline images, and content stream processing. It is designed for document processing, text mining, and automated analysis of PDF files. The architecture follows a receiver/callback pattern for processing content streams, with `PDF::Reader` as the main entry point. Key modules include `PDF::Reader::Page` for high-level page access, `PDF::Reader::ObjectHash` for low-level object access, `PDF::Reader::Parser` for tokenization, and `PDF::Reader::Filter` for stream decompression. The library uses Sorbet for static type checking and includes a comprehensive test suite with over 120 spec files and numerous real-world PDF test fixtures. The codebase demonstrates solid engineering practices: clean abstractions (value objects like `Point`, `Rectangle`, `TextRun`), thread-safe caching (`SynchronizedCache`), optimized matrix operations (`TransformationMatrix`), and a pluggable width calculator system. It is actively maintained with support for multiple Ruby versions (2.1–4.0, JRuby, TruffleRuby) and has a well-documented changelog spanning over a decade of development.
hotpdf is a Python library for fast and memory-efficient PDF text extraction and search. It wraps pdfminer.six to load PDF pages into memory using a sparse matrix representation, a trie for text search, and a span map for grouping characters. The library provides a HotPdf class with methods to find text (with options for case sensitivity and span extraction), extract text from bounding boxes, extract spans, and merge multiple PDF documents. The architecture separates concerns into processing (processor.py), memory mapping (memory_map.py), data structures (data/classes.py), and utilities (utils.py).
CheatReader is a Flutter-based desktop ebook reader designed for low-distraction reading. It provides a floating, always-on-top window that supports single-line and multi-line reading modes, transparency, a boss key for quick hide/restore, system tray integration, and app disguise (icon/name change). The application imports local files in multiple formats (txt, epub, html, md, fb2, docx, pdf) via text extraction, never modifying the source. It features a bookshelf with reading progress tracking, customizable keyboard shortcuts, auto page-turn, full-text search, and a control panel for all settings. The architecture is a standard Flutter app with platform-specific abstractions for window management, file import, and startup behavior, targeting Windows, macOS, and Linux. The codebase is well-tested, localized in English and Chinese, and uses a spec-driven development process (OpenSpec). While the main reader surface widget is large (~2600 lines), the overall structure demonstrates solid engineering with reusable patterns for platform abstraction, settings persistence, and text extraction.
Textract is a text extraction library and command-line tool that extracts text from over 30 file formats including PDF, DOC, DOCX, images, audio, email, and structured data formats. The architecture centers around a parser registry that routes files to format-specific parsers based on extension, with a unified Source abstraction handling file paths, bytes, and streams as input. Key entry points are the Python API (textract.process()) and CLI interface (textract.bin.textract). The system relies on external tools like Poppler, Tesseract, and LibreOffice for certain formats while using pure Python parsers for others. The codebase demonstrates strong engineering practices with a clean plugin architecture, comprehensive test suite, and modern tooling (uv, ruff, pytest).
This repository provides a Python library for converting web pages into text optimized for Large Language Model (LLM) input. It fetches HTML content using Playwright (headless browser) and processes it to extract meaningful text while preserving structural information like tables, links, and images in a text format. The core processing logic converts HTML tables to markdown, handles image and link preservation (or removal), and strips unnecessary tags (script, style) to reduce noise. The library is designed as a preprocessing step before feeding web content to LLMs for tasks such as data extraction or summarization. It includes three main modules: HTML fetching, HTML processing, and a combined convenience function.
The pyhwp repository is a Python library and command-line toolset for parsing, analyzing, and converting Hangul Word Processor (HWP) version 5 files. It provides tools to extract text, metadata, and structural information from HWP files and convert them to HTML, ODT (OpenDocument Text), and plain text formats. The architecture is modular, separating concerns into binary model parsing, storage abstraction, platform-specific backends, and transformation pipelines. Key entry points include command-line tools like hwp5proc (for inspection), hwp5odt/htm/txt (for conversion), and hwp5view (for viewing). The system reads HWP files via storage abstractions, parses them into record streams using a declarative binary modeling system, and optionally transforms the internal representation via XSLT for output formats. While the project shows signs of active maintenance with recent security updates and version bumps, it exhibits technical drift due to continued support for end-of-life Python versions (2.7, 3.5-3.8) and reliance on legacy compatibility code.