export default Poppler;
export type OptionDetails = {
    /**
     * The argument to pass to the binary.
     */
    arg: string;
    /**
     * The type of the option.
     */
    type: ("boolean" | "number" | "string");
    /**
     * The minimum version of the binary that supports this option.
     */
    minVersion?: string | undefined;
    /**
     * The maximum version of the binary that supports this option.
     */
    maxVersion?: string | undefined;
};
export type PopplerAcceptedOptions = Record<string, OptionDetails>;
export type PdfAttachOptions = import("./options/pdfattach").PdfAttachOptions;
export type PdfDetachOptions = import("./options/pdfdetach").PdfDetachOptions;
export type PdfImagesOptions = import("./options/pdfimages").PdfImagesOptions;
export type PdfFontsOptions = import("./options/pdffonts").PdfFontsOptions;
export type PdfInfoOptions = import("./options/pdfinfo").PdfInfoOptions;
export type PdfSeparateOptions = import("./options/pdfseparate").PdfSeparateOptions;
export type PdfToCairoOptions = import("./options/pdftocairo").PdfToCairoOptions;
export type PdfToHtmlOptions = import("./options/pdftohtml").PdfToHtmlOptions;
export type PdfToPpmOptions = import("./options/pdftoppm").PdfToPpmOptions;
export type PdfToPsOptions = import("./options/pdftops").PdfToPsOptions;
export type PdfToTextOptions = import("./options/pdftotext").PdfToTextOptions;
export type PdfUniteOptions = import("./options/pdfunite").PdfUniteOptions;
export type PopplerOptions = (PdfAttachOptions | PdfDetachOptions | PdfFontsOptions | PdfImagesOptions | PdfInfoOptions | PdfSeparateOptions | PdfToCairoOptions | PdfToHtmlOptions | PdfToPpmOptions | PdfToPsOptions | PdfToTextOptions | PdfUniteOptions);
export type PopplerExtraOptions = {
    /**
     * An `AbortSignal` that can be used to cancel the operation.
     */
    signal?: AbortSignal | undefined;
};
export class Poppler {
    /**
     * @param {string} [binPath] - Path to the directory containing the poppler-utils binaries.
     * If not provided, the constructor will attempt to find the Poppler `pdfinfo` binary
     * in the PATH environment variable and use that as the path for all binaries.
     * For `win32` the binaries are bundled with the package and will be used
     * if local binaries cannot be found.
     * @throws {Error} If the Poppler binaries cannot be found.
     */
    constructor(binPath?: string);
    /**
     * @description Returns the path of the Poppler binaries.
     * @returns {string} Path of the Poppler binaries' directory.
     */
    get path(): string;
    /**
     * @author Frazer Smith
     * @description Embeds files (attachments) into a PDF file.
     * @param {string} file - Filepath of the PDF file to read.
     * @param {string} fileToAttach - Filepath of the attachment to be embedded into the PDF file.
     * @param {string} outputFile - Filepath of the file to output the results to.
     * @param {PdfAttachOptions} [options] - Options to pass to the pdfattach binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfAttach(file: string, fileToAttach: string, outputFile: string, options?: PdfAttachOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Lists or extracts embedded files (attachments) from a PDF file.
     * @param {string} file - Filepath of the PDF file to read.
     * @param {PdfDetachOptions} [options] - Options to pass to the pdfdetach binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfDetach(file: string, options?: PdfDetachOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Lists the fonts used in a PDF file along with various information for each font.
     * @param {(Buffer|string)} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {PdfFontsOptions} [options] - Options to pass to the pdffonts binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfFonts(file: (Buffer | string), options?: PdfFontsOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Saves images from a PDF file as PPM, PBM, PNG, TIFF, JPEG, JPEG2000, or JBIG2 files.
     * @param {(Buffer|string)} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {string} [outputPrefix] - Filename prefix of output files.
     * @param {PdfImagesOptions} [options] - Options to pass to the pdfimages binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfImages(file: (Buffer | string), outputPrefix?: string, options?: PdfImagesOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Prints the contents of the `Info` dictionary from a PDF file.
     * @param {(Buffer|string)} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {PdfInfoOptions} [options] - Options to pass to the pdfinfo binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<Record<string, string>|string>} A promise that resolves with a stdout string or JSON object if
     * `options.printAsJson` is `true`, or rejects with an `Error` object.
     */
    pdfInfo(file: (Buffer | string), options?: PdfInfoOptions, extras?: PopplerExtraOptions): Promise<Record<string, string> | string>;
    /**
     * @author Frazer Smith
     * @description Extracts single pages from a PDF file,
     * and writes one PDF file for each page to outputPattern.
     * This will not work if the file is encrypted.
     * @param {string} file - Filepath of the PDF file to read.
     * @param {string} outputPattern - Should contain %d (or any variant respecting printf format),
     * since %d is replaced by the page number.
     * As an example, `sample-%d.pdf` will produce `sample-1.pdf` for a single page document.
     * @param {PdfSeparateOptions} [options] - Options to pass to the pdfseparate binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfSeparate(file: string, outputPattern: string, options?: PdfSeparateOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Converts a PDF file to EPS/JPEG/PDF/PNG/PS/SVG/TIFF.
     * @param {Buffer|string} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {string} [outputFile] - Filepath of the file to output the results to.
     *
     * If `undefined` then will write output to stdout. Using stdout is not valid with image formats
     * (jpeg, png, and tiff) unless `options.singleFile` is set to `true`.
     * Encoding is set to `binary` if used with `options.singleFile` or `options.pdfFile`.
     *
     * If not set then the output filename will be derived from the PDF file name.
     * @param {PdfToCairoOptions} [options] - Options to pass to the pdftocairo binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfToCairo(file: Buffer | string, outputFile?: string, options?: PdfToCairoOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Converts a PDF file to HTML.
     * @param {(Buffer|string)} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {string} [outputFile] - Filepath of the file to output the results to.
     * If `undefined` then Poppler will use the directory and name of the original file
     * and create a new file, with `-html` appended to the end of the filename.
     *
     * Required if `file` is a Buffer.
     * @param {PdfToHtmlOptions} [options] - Options to pass to the pdftohtml binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfToHtml(file: (Buffer | string), outputFile?: string, options?: PdfToHtmlOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Converts a PDF file to colour image files in Portable Pixmap (PPM) format,
     * grayscale image files in Portable Graymap (PGM) format, or monochrome image files
     * in Portable Bitmap (PBM) format.
     * @param {(Buffer|string)} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {string} outputPath - Filepath to output the results to.
     * @param {PdfToPpmOptions} [options] - Options to pass to the pdftoppm binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfToPpm(file: (Buffer | string), outputPath: string, options?: PdfToPpmOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Converts a PDF file to PostScript (PS).
     * @param {(Buffer|string)} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {string} [outputFile] - Filepath of the file to output the results to.
     * If `undefined` then will write output to stdout.
     * @param {PdfToPsOptions} [options] - Options to pass to the pdftops binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfToPs(file: (Buffer | string), outputFile?: string, options?: PdfToPsOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Converts a PDF file to TXT.
     * @param {(Buffer|string)} file - PDF file as Buffer, or filepath of the PDF file to read.
     * @param {string} [outputFile] - Filepath of the file to output the results to.
     * If `undefined` then will write output to stdout.
     * @param {PdfToTextOptions} [options] - Options to pass to the pdftotext binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfToText(file: (Buffer | string), outputFile?: string, options?: PdfToTextOptions, extras?: PopplerExtraOptions): Promise<string>;
    /**
     * @author Frazer Smith
     * @description Merges several PDF files in order of their occurrence in the files array to
     * one PDF result file.
     * @param {string[]} files - Filepaths of the PDF files to merge.
     * An entire directory of PDF files can be merged like so: `path/to/directory/*.pdf`.
     * @param {string} outputFile - Filepath of the file to output the resulting merged PDF to.
     * @param {PdfUniteOptions} [options] - Options to pass to the pdfunite binary.
     * @param {PopplerExtraOptions} [extras] - Extra options.
     * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
     */
    pdfUnite(files: string[], outputFile: string, options?: PdfUniteOptions, extras?: PopplerExtraOptions): Promise<string>;
    #private;
}
