UNPKG

pdf-to-png-converter

Version:

Node.js utility to convert PDF file/buffer pages to PNG files/buffers. No build-time compilation required — pre-built native binaries included for all major platforms.

14 lines (13 loc) 735 B
import type { PdfToPngOptions, PngPageOutput } from './interfaces/index.js'; /** * Convert PDF pages to PNG buffers and/or files. * * Sole public entry point. Validates and defaults `props` via `normalizePdfToPngOptions`, * then delegates to the internal `pdfToPngCore`. The CLI calls `pdfToPngCore` directly * with its own already-normalized options to avoid double validation. * * @param pdfFile - PDF file path (string), `ArrayBufferLike`, or `Uint8Array`. * @param props - Optional caller-facing options; see {@link PdfToPngOptions}. * @returns One `PngPageOutput` per processed page. */ export declare function pdfToPng(pdfFile: string | ArrayBufferLike | Uint8Array, props?: PdfToPngOptions): Promise<PngPageOutput[]>;