import { BinaryData, PDFDocumentProxy, DocumentInitParameters } from './types/src/display/api';
import * as canvas from 'canvas';
import * as _PDFJS from './types/src/pdf';

declare function getMeta$1(data: BinaryData | PDFDocumentProxy): Promise<{
    info: Record<string, any>;
    metadata: Record<string, any>;
}>;

declare function extractText$1(data: BinaryData | PDFDocumentProxy, options?: {
    mergePages?: boolean;
}): Promise<{
    totalPages: number;
    text: string | string[];
}>;

declare function extractImages$1(data: BinaryData | PDFDocumentProxy, pageNumber: number): Promise<Uint8ClampedArray[]>;
declare function renderPageAsImage$1(data: BinaryData, pageNumber: number, options?: {
    canvas?: () => Promise<typeof canvas>;
    /** @default 1 */
    scale?: number;
    width?: number;
    height?: number;
}): Promise<ArrayBuffer>;

type PDFJS = typeof _PDFJS;
interface UnPDFConfiguration {
    /**
     * By default, UnPDF will use the latest version of PDF.js compiled for
     * serverless environments. If you want to use a different version, you can
     * provide a custom resolver function.
     *
     * @example
     * // Use the official PDF.js build (make sure to install it first)
     * () => import('pdfjs-dist')
     */
    pdfjs?: () => Promise<any>;
}

declare function configureUnPDF(options: UnPDFConfiguration): Promise<void>;

/**
 * Returns a PDFDocumentProxy instance from a given binary data.
 *
 * Applies the following defaults:
 * - `isEvalSupported: false`
 * - `useSystemFonts: true`
 */
declare function getDocumentProxy(data: BinaryData, options?: DocumentInitParameters): Promise<PDFDocumentProxy>;
declare function getResolvedPDFJS(): Promise<PDFJS>;
declare function resolvePDFJSImports(pdfjsResolver?: () => Promise<any>, { force }?: {
    force?: boolean | undefined;
}): Promise<void>;

/** @deprecated Use `configureUnPDF` instead */
declare const defineUnPDFConfig: typeof configureUnPDF;

declare const getMeta: typeof getMeta$1;
declare const extractText: typeof extractText$1;
declare const extractImages: typeof extractImages$1;
declare const renderPageAsImage: typeof renderPageAsImage$1;

export { configureUnPDF, defineUnPDFConfig, extractImages, extractText, getDocumentProxy, getMeta, getResolvedPDFJS, renderPageAsImage, resolvePDFJSImports };
