OcrProvider
@forge/monorepo / backend/src / OcrProvider
Interface: OcrProvider
Defined in: backend/src/documents/vision.ts:79
Transcribes an image or a scanned document.
Takes the original bytes and media type, not page images: rasterising a PDF needs a renderer, and every real OCR service (Textract, Document AI, Azure Document Intelligence) accepts a PDF directly and does that itself. Making rasterisation the provider's business is both simpler and what the APIs already assume.
Properties
id
readonlyid:string
Defined in: backend/src/documents/vision.ts:80
mediaTypes
readonlymediaTypes: readonlystring[]
Defined in: backend/src/documents/vision.ts:81
Methods
recognise()
recognise(
input):Promise<ExtractionFailure|OcrResult>
Defined in: backend/src/documents/vision.ts:82
Parameters
input
bytes
Uint8Array
limits
mediaType
string
Returns
Promise<ExtractionFailure | OcrResult>