Skip to Content
Anuma SDKReactInternalClassesPdfProcessor

PdfProcessor

Defined in: src/lib/processors/PdfProcessor.ts:17 

Processor for PDF files that extracts text content. Falls back to rendering pages as images when text extraction yields no content (e.g. scanned/image-based PDFs), enabling vision models to read the document.

Implements

Constructors

Constructor

new PdfProcessor(): PdfProcessor

Returns

PdfProcessor

Properties

name

readonly name: "pdf" = "pdf"

Defined in: src/lib/processors/PdfProcessor.ts:18 

Unique identifier for this processor

Implementation of

FileProcessor.name


supportedExtensions

readonly supportedExtensions: string[]

Defined in: src/lib/processors/PdfProcessor.ts:20 

File extensions this processor can handle (fallback if MIME type unavailable)

Implementation of

FileProcessor.supportedExtensions


supportedMimeTypes

readonly supportedMimeTypes: string[]

Defined in: src/lib/processors/PdfProcessor.ts:19 

MIME types this processor can handle

Implementation of

FileProcessor.supportedMimeTypes

Methods

process()

process(file: FileWithData): Promise<ProcessedFileResult | null>

Defined in: src/lib/processors/PdfProcessor.ts:22 

Process a file and extract text content

Parameters

ParameterTypeDescription

file

FileWithData

File metadata with data URL

Returns

Promise<ProcessedFileResult | null>

Extracted text content and metadata, or null if processing fails/not applicable

Implementation of

FileProcessor.process

Last updated on