aeat.adapters.inbound.borrador._parsers._pdfplumber_backend module¶
Pdfplumber-backed page text extraction for Modelo 100 PDFs.
Implements the single
extract_pages_text()
primitive that the borrador extractors consume. The function isolates the
pdfplumber dependency so other backends (e.g. pdfminer, OCR) can be swapped in
without touching extractor code.
The backend delegates to
extract_pages_text_from_path() and
wraps failures in BorradorParseError
so callers stay inside the borrador parse-error family.
- extract_pages_text(pdf_path)[source]¶
Extract stripped text from each Modelo 100 PDF page in order.
- Parameters:
pdf_path (
Path) – Path to the PDF whose pages will be read.- Return type:
- Returns:
A tuple of stripped per-page text strings, in page order.
- Raises:
BorradorParseError – When the source path is missing or the PDF backend cannot extract page text.