/* auto-generated by NAPI-RS */ /* eslint-disable */ /** * Classify a PDF: detect type (TextBased/Scanned/Mixed/ImageBased), * page count, and which pages need OCR. Takes PDF bytes as Buffer. */ export declare function classifyPdf(buffer: Buffer): PdfClassification /** * Extract text within bounding-box regions from a PDF. * * For hybrid OCR: layout model detects regions in rendered images, * this extracts PDF text within those regions — skipping GPU OCR * for text-based pages. * * Each region result includes `needs_ocr` — set when the extracted text * is unreliable (empty, GID-encoded fonts, garbage, encoding issues). * * Coordinates are PDF points with top-left origin. */ export declare function extractTextInRegions(buffer: Buffer, pageRegions: Array): Array /** A page's regions for text extraction: (page_index_0based, bboxes). */ export interface PageRegions { page: number /** Each bbox is [x1, y1, x2, y2] in PDF points, top-left origin. */ regions: Array> } /** Extracted text for one page's regions. */ export interface PageRegionTexts { page: number regions: Array } /** Lightweight PDF classification result. */ export interface PdfClassification { pdfType: string pageCount: number pagesNeedingOcr: Array confidence: number } /** Extracted text for a single region. */ export interface RegionText { text: string /** `true` when the text should not be trusted (empty, GID fonts, garbage, encoding issues). */ needsOcr: boolean }