How ravsinghchandan/pypdf works
pypdf is a pure-Python PDF library. The principal workflow is to open a PDF with PdfReader, access document pages and extract text or metadata, then optionally assemble or modify a document with PdfWriter and write a PDF. The map also preserves documented merge, page transformation, annotation, and encryption capabilities. Edges are limited to README statements and relationships visible in the supplied excerpts or SOURCE INDEX; some subsystems are therefore shown without speculative internal wiring.
Main entry points: _writer.py PDF writer · _reader.py PDF reader · _page.py Page operations · _text_extractor.py Text extraction
Components 22
PDF document I/O
- PDF reader
pypdf/_reader.py - Document access
pypdf/_doc_common.py - PDF writer
pypdf/_writer.py
Pages and text
- Page operations
pypdf/_page.py - Text extraction
pypdf/_text_extraction/_text_extractor.py - Layout extraction
pypdf/_text_extraction/_layout_mode/_fixed_width_page.py - Font decoding
pypdf/_font.py - Glyph mappings
pypdf/_codecs/adobe_glyphs.py - Font metrics
pypdf/_codecs/core_font_metrics.py
PDF object model
- PDF objects
pypdf/generic/_base.py - PDF structures
pypdf/generic/_data_structures.py - Stream filters
pypdf/filters.py - Text codecs
pypdf/_codecs/_codecs.py
Security and metadata
- PDF encryption
pypdf/_encryption.py - Crypto providers
pypdf/_crypt_providers - XMP metadata
pypdf/xmp.py
Annotations and actions
- Annotations
pypdf/annotations/_base.py - Annotation types
pypdf/annotations/_markup_annotations.py - PDF actions
pypdf/actions/_actions.py
Other components
- Library user
- Input PDF
- Output PDF
Connections 28
- Library user → PDF reader: opens PDF
- Input PDF → PDF reader: reads
- PDF reader → Document access: uses document access
pypdf/_reader.py - PDF reader → PDF encryption: uses encryption
pypdf/_reader.py - PDF reader → Page operations: provides pages
pypdf/_reader.py - PDF reader → XMP metadata: reads metadata
pypdf/_reader.py - Library user → Text extraction: requests text
- Page operations → Text extraction: extracts text
pypdf/_page.py - Page operations → Layout extraction: uses layout mode
pypdf/_page.py - Text extraction → Font decoding: decodes fonts
pypdf/_text_extraction/_text_extractor.py - Layout extraction → Text extraction: uses extraction helpers
pypdf/_text_extraction/_layout_mode/_fixed_width_page.py - Font decoding → Glyph mappings: maps glyphs
pypdf/_font.py - Font decoding → Font metrics: uses metrics
pypdf/_font.py - Library user → PDF writer: creates or modifies
- PDF writer → Output PDF: writes PDF
- PDF writer → Document access: uses document access
pypdf/_writer.py - PDF writer → Page operations: merges pages
pypdf/_writer.py - PDF writer → PDF encryption: configures encryption
pypdf/_writer.py - PDF writer → XMP metadata: writes metadata
pypdf/_writer.py - PDF reader → PDF objects: resolves objects
pypdf/_reader.py - Document access → PDF structures: uses structures
pypdf/_doc_common.py - PDF structures → PDF objects: builds on objects
pypdf/generic/_data_structures.py - PDF structures → Stream filters: decodes streams
pypdf/generic/_data_structures.py - Stream filters → Text codecs: uses codecs
pypdf/filters.py - PDF encryption → Crypto providers: selects provider
pypdf/_encryption.py - PDF writer → Annotations: adds annotations
pypdf/_writer.py - Annotation types → Annotations: extends base
pypdf/annotations/_markup_annotations.py - Page operations → PDF actions: uses actions
pypdf/_page.py