fraud agent's pdf parser dropped chargeback evidence pages
Fixes agent PDF parsers that silently drop chargeback evidence pages: counts pages on ingest, extracts per page with failure tracking, and blocks filing when extracted pages do not match the source. Use when evidence summaries miss pages or totals from the original PDF. Not for blurry scan quality failures, where pages are present but unreadable.
TL;DR
A parser that drops pages quietly is worse than one that crashes, because the representment goes out missing its best page and nobody knows. Make page accounting a hard contract: count pages when the PDF lands, extract page by page and record success or failure per page, and refuse to build an evidence pack when extracted pages plus explicitly failed pages do not equal the source count. The usual culprits are scanned pages stored as images with no text layer, encrypted or malformed page objects, and a parser timeout that returns partial output as if it were complete.
fraud agent's pdf parser dropped chargeback evidence pagesUse this when
- Evidence summaries omit content that is visibly in the PDF.
- Multi page statements lose their final pages, often the totals page.
- The parser returns success with suspiciously short text on long files.
Not for this skill when
- Pages extract but the text is garbled from poor scan quality. That is the image quality gate problem.
- The PDF itself is missing pages at the source. Compare with the bank or customer original first.
Steps
- Take one failing PDF and record its true page count and, per page, whether it has a text layer or is a scanned image. Verify: you have a page map to compare extraction against.
- Run your parser and list which pages produced text, which produced nothing, and whether the run reported any warning. Verify: the dropped pages are named, not guessed.
- Fix extraction per page type: OCR the image only pages, and treat parser timeouts and partial results as failures, never as complete output. Verify: the failing PDF now extracts every page or flags the specific pages it cannot.
- Add the accounting gate to the pipeline: source pages must equal extracted plus failed, and a pack cannot be filed with failed pages unless a human accepts the gap on the case. Verify: a staged pack with a dropped page is blocked with the page named.
- Log page accounting on every case so a later loss can be checked against what the parser actually saw. Verify: a sampled filed case shows full page accounting in its record.
Variant phrasings
pdf parser missing pages evidence
Missing pages phrasing.
chargeback pdf last pages not extracted
Final pages phrasing.
agent evidence extraction incomplete silent
Silent failure phrasing.
Compatibility: Any PDF extraction stack, PyMuPDF, pdfplumber, Tesseract OCR, or cloud document AI, in an agent evidence pipeline. Page accounting is stack agnostic.
Why it happens
PDFs are containers of mixed content: native text pages, scanned images, and occasionally damaged objects, all in one file. Simple extractors read the easy pages and skip the hard ones without an error, because skipping is not an exception in most libraries. An agent downstream sees clean, short text and reasonably assumes the document was short.
Edge cases / pitfalls
- Split and merged PDFs from banks can carry broken page trees. A repair pass with a tolerant tool often recovers pages a strict parser drops.
- Page counts can differ between viewers on files with hidden or deleted pages. Trust the parser count you validate, and record which tool counted.
- Do not let OCR confidence silently substitute for presence. A page can OCR confidently and still be the wrong page from a merged bundle.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_bzHKj6bkKKDALMtdP5DOpA