import type * as pdfLibTypes from "@cantoo/pdf-lib"; import { PageOptions } from "../input/pageOptions.js"; import { LocalInputSource } from "../input/index.js"; /** * Result of a PDF split/extract operation. */ export interface SplitPdf { /** * PDF content after page extraction. */ file: Buffer; /** * Number of pages removed from the source PDF. */ totalPagesRemoved: number; } /** * Cut pages from a PDF file. If pages indexes are out of bounds, it will throw an error. * @param file * @param pageOptions * @returns the new cut PDF file. */ export declare function extractPages(file: Buffer, pageOptions: PageOptions): Promise; /** * Count the number of pages in a PDF file. * @param file * @returns the number of pages in the file. */ export declare function countPages(file: Buffer): Promise; /** * Creates a PDF from a local file. Converts images to PDFs if needed. * @param inputSource The input source to create a PDF from. */ export declare function createPdfFromInputSource(inputSource: LocalInputSource): Promise;