///
import { HtmlToPdf, WebToPdf, DocumentToPdf, ImagesToPdf, PdfMerge, PdfReorganize, PdfCreate, GetOperations, WebToImage, HtmlToImage, PdfToImage, PdfToDocument, PdfProtect, PdfUnprotect, PdfFields, PdfFill, PdfInfo, PdfRepair, BarcodeReader, BarcodeGenerate } from "./operations";
import Operation from "./classes/operation";
import Storage from "./classes/storage";
import InstanceOptions from "./utils/instanceOptions";
declare class PDF4dev {
private options;
storage: Storage;
/**
* Create a PDF4dev instance.
* @param apiKey API Key. Visit the dashboard to get a new one. You can also use the PDF4DEV_API_KEY environment variable.
* @returns Operation result
*/
constructor(options?: InstanceOptions);
private makeRequest;
private getInputUrl;
private getInputUrlList;
/**
* Get a list of operations
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/getOperations
* @returns Operation result
*/
getOperations(params?: GetOperations): Promise>;
/**
* Get an operation
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/getOneOperation
* @returns Operation result
*/
getOperation(id: String): Promise;
/**
* Convert HTML code to a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/htmlToPdf
* @param html HTML Code to convert
* @param options Operation options
* @returns Operation result
*/
htmlToPdf(html: String, options?: HtmlToPdf): Promise;
/**
* Convert a website to a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/webToPdf
* @param url URL to convert
* @param options Operation options
* @returns Operation result
*/
webToPdf(url: String, options?: WebToPdf): Promise;
/**
* Convert a document to a PDF file. You can convert from: doc, docx, ppt, pptx, xml, xmlx and odt, ods, odp.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/documentToPdf
* @param url URL to the document
* @param options Operation options
* @returns Operation result
*/
documentToPdf(url: String, options?: DocumentToPdf): Promise;
/**
* Convert a document to a PDF file. You can convert from: doc, docx, ppt, pptx, xml, xmlx and odt, ods, odp.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/documentToPdf
* @param path Path to the document
* @param options Operation options
* @returns Operation result
*/
documentToPdf(path: String, options?: DocumentToPdf): Promise;
/**
* Convert a document to a PDF file. You can convert from: doc, docx, ppt, pptx, xml, xmlx and odt, ods, odp.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/documentToPdf
* @param file Document buffer
* @param options Operation options
* @returns Operation result
*/
documentToPdf(file: Buffer, options?: DocumentToPdf): Promise;
/**
* Convert images to a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/imageToPdf
* @param files Array of images buffer
* @param options Operation options
* @returns Operation result
*/
imagesToPdf(files: Array, options?: ImagesToPdf): Promise;
/**
* Convert images to a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/imageToPdf
* @param paths Array of images paths
* @param options Operation options
* @returns Operation result
*/
imagesToPdf(paths: Array, options?: ImagesToPdf): Promise;
/**
* Convert images to a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/imageToPdf
* @param urls Array of images URL
* @param options Operation options
* @returns Operation result
*/
imagesToPdf(urls: Array, options?: ImagesToPdf): Promise;
/**
* Merge differents PDF files in one file.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfMerge
* @param files Array of PDF buffers
* @param options Operation options
* @returns Operation result
*/
pdfMerge(files: Array, options?: PdfMerge): Promise;
/**
* Merge differents PDF files in one file.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfMerge
* @param paths Array of PDF paths
* @param options Operation options
* @returns Operation result
*/
pdfMerge(paths: Array, options?: PdfMerge): Promise;
/**
* Merge differents PDF files in one file.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfMerge
* @param urls Array of PDF urls
* @param options Operation options
* @returns Operation result
*/
pdfMerge(urls: Array, options?: PdfMerge): Promise;
/**
* Useful for reorganize a document: Change pages order, split a file in multiples files, Remove pages.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfReorganize
* @param file PDF Buffer
* @param options Operation options
* @returns Operation result
*/
pdfReorganize(file: Buffer, options?: PdfReorganize): Promise;
/**
* Useful for reorganize a document: Change pages order, split a file in multiples files, Remove pages.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfReorganize
* @param path PDF path
* @param options Operation options
* @returns Operation result
*/
pdfReorganize(path: String, options?: PdfReorganize): Promise;
/**
* Useful for reorganize a document: Change pages order, split a file in multiples files, Remove pages.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfReorganize
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfReorganize(url: String, options?: PdfReorganize): Promise;
/**
* Create a PDF file using a JSON. Also you can edit one specifying an URL in template property.
* You'll be able to add elements like text, images but not delete them.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfCreate
* @param options Operation options
* @returns Operation result
*/
pdfCreate(options?: PdfCreate): Promise;
/**
* Convert a website to an image file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/webToImage
* @param url URL to convert
* @param options Operation options
* @returns Operation result
*/
webToImage(url: String, options?: WebToImage): Promise;
/**
* Convert HTML Code to an image file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/htmlToImage
* @param html HTML Code to convert
* @param options Operation options
* @returns Operation result
*/
htmlToImage(html: String, options?: HtmlToImage): Promise;
/**
* Convert a PDF file to an image file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfToImage
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfToImage(url: String, options?: PdfToImage): Promise;
/**
* Convert a PDF file to a document
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfToDocument
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfToDocument(url: String, options: PdfToDocument): any;
/**
* Convert a PDF file to a document
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfToDocument
* @param url PDF Path
* @param options Operation options
* @returns Operation result
*/
pdfToDocument(path: String, options: PdfToDocument): any;
/**
* Convert a PDF file to a document
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfToDocument
* @param file PDF Buffer
* @param options Operation options
* @returns Operation result
*/
pdfToDocument(file: Buffer, options: PdfToDocument): any;
/**
* Protect a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfProtect
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfProtect(url: String, options: PdfProtect): Promise;
/**
* Protect a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfProtect
* @param url PDF Path
* @param options Operation options
* @returns Operation result
*/
pdfProtect(path: String, options: PdfProtect): Promise;
/**
* Protect a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfProtect
* @param url PDF Buffer
* @param options Operation options
* @returns Operation result
*/
pdfProtect(file: Buffer, options: PdfProtect): Promise;
/**
* Unprotect a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfUnprotect
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfUnprotect(url: String, options: PdfUnprotect): Promise;
/**
* Unprotect a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfUnprotect
* @param url PDF Path
* @param options Operation options
* @returns Operation result
*/
pdfUnprotect(path: String, options: PdfUnprotect): Promise;
/**
* Unprotect a PDF file
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfUnprotect
* @param url PDF Buffer
* @param options Operation options
* @returns Operation result
*/
pdfUnprotect(file: Buffer, options: PdfUnprotect): Promise;
/**
* Return a list of fields in the PDF file. You can use PDF Fill to complete it.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfFields
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfFields(url: String, options?: PdfFields): Promise;
/**
* Return a list of fields in the PDF file. You can use PDF Fill to complete it.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfFields
* @param path PDF Path
* @param options Operation options
* @returns Operation result
*/
pdfFields(path: String, options?: PdfFields): Promise;
/**
* Return a list of fields in the PDF file. You can use PDF Fill to complete it.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfFields
* @param file PDF file
* @param options Operation options
* @returns Operation result
*/
pdfFields(file: Buffer, options?: PdfFields): Promise;
/**
* Fill the PDF fields.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfFill
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfFill(url: String, options: PdfFill): Promise;
/**
* Fill the PDF fields.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfFill
* @param path PDF Path
* @param options Operation options
* @returns Operation result
*/
pdfFill(path: String, options: PdfFill): Promise;
/**
* Fill the PDF fields.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfFill
* @param file PDF Buffer
* @param options Operation options
* @returns Operation result
*/
pdfFill(file: Buffer, options: PdfFill): Promise;
/**
* Get PDF information. If you need the fields, you can use PDF Fields instead.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfInfo
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfInfo(url: String, options?: PdfInfo): Promise;
/**
* Get PDF information. If you need the fields, you can use PDF Fields instead.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfInfo
* @param path PDF Path
* @param options Operation options
* @returns Operation result
*/
pdfInfo(path: String, options?: PdfInfo): Promise;
/**
* Get PDF information. If you need the fields, you can use PDF Fields instead.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfInfo
* @param file PDF Buffer
* @param options Operation options
* @returns Operation result
*/
pdfInfo(file: Buffer, options?: PdfInfo): Promise;
/**
* Try to repair an invalid PDF
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfRepair
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
pdfRepair(url: String, options?: PdfRepair): Promise;
/**
* Try to repair an invalid PDF
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfRepair
* @param path PDF Path
* @param options Operation options
* @returns Operation result
*/
pdfRepair(path: String, options?: PdfRepair): Promise;
/**
* Try to repair an invalid PDF
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/pdfRepair
* @param file PDF Buffer
* @param options Operation options
* @returns Operation result
*/
pdfRepair(file: Buffer, options?: PdfRepair): Promise;
/**
* Read barcodes, QR, or similar formats from a PDF or image file.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/barcodeReader
* @param url PDF URL
* @param options Operation options
* @returns Operation result
*/
barcodeReader(url: String, options?: BarcodeReader): Promise;
/**
* Read barcodes, QR, or similar formats from a PDF or image file.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/barcodeReader
* @param path PDF Path
* @param options Operation options
* @returns Operation result
*/
barcodeReader(path: String, options?: BarcodeReader): Promise;
/**
* Read barcodes, QR, or similar formats from a PDF or image file.
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/barcodeReader
* @param file PDF Buffer
* @param options Operation options
* @returns Operation result
*/
barcodeReader(file: Buffer, options?: BarcodeReader): Promise;
/**
* Create a barcode (Or other formats, like a QR)
*
* For more information: https://api.pdf4.dev/v1/docs/#operation/barcodeGenerate
* @param options Operation options
* @returns Operation result
*/
barcodeGenerate(options: BarcodeGenerate): Promise;
}
export default PDF4dev;