mindee
Version:
Mindee Client Library for Node.js
47 lines (46 loc) • 1.08 kB
TypeScript
import { LocalInputSource } from "../input/index.js";
import { ExtractedPdfs } from "../pdf/extractedPdfs.js";
export declare class PdfExtractor {
/**
* Buffer containing the PDF data.
* @private
*/
private sourcePdf;
/**
* Filename of the PDF.
* @private
*/
private filename;
/**
* Input document.
* @private
*/
private readonly inputDocument;
/**
* Whether the extractor has been initialized.
* @private
*/
private initialized;
/**
* PDF library instance.
* @private
*/
private pdfLib;
/**
* List of extracted PDFs.
* @private
*/
private extractedPdfs;
constructor(inputDocument: string | LocalInputSource);
init(): Promise<void>;
/**
* Gets the number of pages in the PDF.
* @returns The number of pages in the PDF.
*/
getPageCount(): Promise<number>;
/**
* Extracts pages from the PDF.
* @param pageIndexes
*/
extractSubDocuments(pageIndexes: number[][]): Promise<ExtractedPdfs>;
}