// src/types/pdf-poppler.d.ts

/**
 * This is a custom type declaration file for the 'pdf-poppler' module.
 * Since no official @types/pdf-poppler package exists, this file provides
 * TypeScript with the necessary type information to understand the module's
 * structure, preventing import errors and enabling type checking.
 */
declare module 'pdf-poppler' {
  /**
   * Defines the options available for the pdfToCairo conversion method.
   * This interface can be expanded as more options are used.
   */
  export interface PopplerOptions {
    antialias?: 'default' | 'gray' | 'none' | 'subpixel';
    cropBox?: boolean;
    cropHeight?: number;
    cropWidth?: number;
    cropX?: number;
    cropY?: number;
    firstPage?: number;
    lastPage?: number;
    jpegFile?: boolean;
    jpegOptions?: string;
    noCrop?: boolean;
    noRotate?: boolean;
    ownerPassword?: string;
    paperHeight?: number;
    paperWidth?: number;
    paperSize?: 'letter' | 'legal' | 'A4' | 'A3' | 'match';
    pngFile?: boolean;
    resolution?: number;
    svgFile?: boolean;
    userPassword?: string;
  }

  export class Poppler {
    constructor(binPath?: string);
    pdfToCairo(file: string, outputFilePrefix?: string, options?: PopplerOptions): Promise<string>;
  }

  export default Poppler;
}