chromiumly
Version:
A lightweight Typescript library that interacts with Gotenberg's different modules to convert a variety of document formats to PDF files.
24 lines (23 loc) • 1.14 kB
TypeScript
import { PathLikeOrReadStream } from '../../common';
import { ConversionOptions, MergeOptions } from '../interfaces/pdf-engines.types';
/**
* Utility class for handling common tasks related to PDF engine operations.
*/
export declare class PDFEnginesUtils {
/**
* Adds PDF files to the FormData object.
*
* @param {PathLikeOrReadStream[]} files - An array of PDF files to be added to the FormData.
* @param {FormData} data - The FormData object to which PDF files will be added.
* @throws {Error} Throws an error if the file extension is not supported.
*/
static addFiles(files: PathLikeOrReadStream[], data: FormData): Promise<void>;
/**
* Customizes the FormData object based on the provided conversion options.
*
* @param {FormData} data - The FormData object to be customized.
* @param {ConversionOptions | MergeOptions} options - The options to apply to the FormData.
* @returns {Promise<void>} A Promise that resolves once the customization is complete.
*/
static customize(data: FormData, options: ConversionOptions | MergeOptions): Promise<void>;
}