Split the 1288-line info.py into smaller, single-responsibility modules: - _types.py: Enums, type aliases, lookup dictionaries - _contentstream.py: PDF content stream parsing, DPI calculation - _image.py: ImageInfo class and image finding functions - _worker.py: Concurrency/worker process handling - info.py: PageInfo, PdfInfo classes (reduced to ~530 lines) Public API unchanged - all existing imports continue to work.
13 lines
395 B
Python
13 lines
395 B
Python
#!/usr/bin/env python3
|
|
|
|
# SPDX-FileCopyrightText: 2022 James R. Barlow
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
"""For extracting information about PDFs prior to OCR."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from ocrmypdf.pdfinfo._types import Colorspace, Encoding, FloatRect
|
|
from ocrmypdf.pdfinfo.info import PageInfo, PdfInfo
|
|
|
|
__all__ = ["Colorspace", "Encoding", "FloatRect", "PageInfo", "PdfInfo"]
|