import { Readable } from 'stream'; export type Platform = 'win32' | 'darwin' | 'linux'; export type OutputFormat = 'png' | 'jpeg' | 'tiff' | 'pdf' | 'ps' | 'eps' | 'svg'; export type PdfInput = string | Buffer | Uint8Array | Readable; export interface PdfPopplerConfig { binaryPath?: string; binaryPackage?: string; version?: string; preferXvfb?: boolean; platform?: Platform; isLambda?: boolean; isCI?: boolean; execOptions?: ExecOptions; } export interface ExecOptions { encoding?: BufferEncoding; maxBuffer?: number; timeout?: number; env?: NodeJS.ProcessEnv; } export type AntialiasMode = 'default' | 'none' | 'gray' | 'subpixel'; export interface ConvertOptions { format?: OutputFormat; scale?: number | null; page?: number | null; pages?: number[]; dpi?: number; quality?: number; firstPage?: number; lastPage?: number; password?: string; ownerPassword?: string; cropBox?: boolean; transparent?: boolean; antialias?: AntialiasMode; } export interface TextOptions { page?: number; firstPage?: number; lastPage?: number; layout?: boolean; raw?: boolean; password?: string; encoding?: string; eol?: 'unix' | 'dos' | 'mac'; noDiag?: boolean; noPageBreaks?: boolean; } export interface HtmlOptions { page?: number; firstPage?: number; lastPage?: number; password?: string; noFrames?: boolean; complex?: boolean; singlePage?: boolean; ignoreImages?: boolean; zoom?: number; } export interface TextResult { page: number; text: string; } export interface FontInfo { name: string; type: string; encoding: string; embedded: boolean; subset: boolean; unicode: boolean; } export interface PageResult { page: number; data: Buffer; } export interface PageStreamResult { page: number; stream: Readable; } export interface SplitResult { page: number; data: Buffer; } export interface SplitStreamResult { page: number; stream: Readable; } export interface Attachment { index: number; name: string; description?: string; size: number; creationDate?: string; modDate?: string; } export interface ExtractedAttachment { name: string; data: Buffer; } export interface SignatureDetails { signerName?: string; signerCertificate?: string; signTime?: string; hashAlgorithm?: string; valid: boolean; trusted: boolean; } export interface SignatureInfo { signed: boolean; signatures: SignatureDetails[]; } export interface PdfInfo { pages: string; page_size: string; width_in_pts: number; height_in_pts: number; title?: string; author?: string; creator?: string; producer?: string; creation_date?: string; mod_date?: string; [key: string]: string | number | undefined; } export interface ImageData { page: string; num: string; type: string; width: string; height: string; color: string; comp: string; bpc: string; enc: string; interp: string; object: string; ID: string; 'x-ppi': string; 'y-ppi': string; size: string; ratio: string; [key: string]: string; } export interface VersionInfo { version: string; hasXvfb: boolean; path: string; } export interface ResolvedConfig { platform: Platform; isLambda: boolean; isCI: boolean; preferXvfb: boolean; binaryPath?: string; binaryPackage?: string; version?: string; execOptions: Required> & ExecOptions; }