/* auto-generated by NAPI-RS */ /* eslint-disable */ /** * Lightweight PDF classification — returns type, page count, and OCR pages. * Faster than detectPdf as it skips building the full PdfResult. * Pages in pagesNeedingOcr are 0-indexed. */ export declare function classifyPdf(buffer: Buffer): PdfClassification /** Fast detection only — no text extraction or markdown. */ export declare function detectPdf(buffer: Buffer): PdfResult /** Extract plain text from a PDF Buffer. */ export declare function extractText(buffer: Buffer): string /** * 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 `needsOcr` — 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 /** Extract text with position information from a PDF Buffer. */ export declare function extractTextWithPositions(buffer: Buffer, pages?: Array | undefined | null): 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 /** 0-indexed page numbers that need OCR. */ pagesNeedingOcr: Array confidence: number } /** Full PDF processing result with markdown and metadata. */ export interface PdfResult { pdfType: string markdown?: string pageCount: number processingTimeMs: number /** 1-indexed page numbers that need OCR. */ pagesNeedingOcr: Array title?: string confidence: number isComplexLayout: boolean pagesWithTables: Array pagesWithColumns: Array hasEncodingIssues: boolean } /** Process a PDF from a Buffer: detect type, extract text, and convert to Markdown. */ export declare function processPdf(buffer: Buffer, pages?: Array | undefined | null): PdfResult /** 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 } /** A positioned text item extracted from a PDF. */ export interface TextItem { text: string x: number y: number width: number height: number font: string fontSize: number page: number isBold: boolean isItalic: boolean itemType: string }