Skip to main content

createScannedPdfParser

@forge/monorepo


@forge/monorepo / backend/src / createScannedPdfParser

Function: createScannedPdfParser()

createScannedPdfParser(deps): DocumentParser

Defined in: backend/src/documents/vision.ts:268

OCR for a document the text parser could not read — a scanned PDF.

A fallback parser rather than a second entry in the dispatch table, because both parsers claim application/pdf and the dispatch table holds one per media type. The pipeline tries the text parser first and falls back only on no-text-layer, which is the reason #131 made that a distinct reason rather than folding it into malformed: the distinction is now load-bearing.

Parameters

deps

ocr

OcrProvider

Returns

DocumentParser