#!/usr/bin/env node /** * Help text shown for `--help` and on invalid usage. * Exported so it can be asserted in tests without running the full CLI pipeline. */ export declare const HELP_TEXT = "Usage: pdf-to-png-converter [options]\n\nOptions:\n --output-folder Folder path where PNG files will be written\n --viewport-scale Scale factor applied to each page viewport\n --use-system-fonts Attempt to use fonts installed on the host system\n --disable-font-face Do not load embedded fonts (true/false)\n --enable-xfa Process XFA form data (true/false)\n --pdf-file-password Password for encrypted PDFs\n --pages-to-process Comma-separated list of 1-based page numbers\n --verbosity-level pdfjs verbosity level (0=errors, 1=warnings, 5=infos)\n --return-metadata-only Return page metadata without rendering images\n --return-page-content Retain rendered PNG buffers in results (default: false)\n --process-pages-in-parallel Process pages concurrently\n --concurrency-limit Maximum number of pages rendered simultaneously\n --silent Suppress output unless there is an error\n --version Show version\n --help Show this help message"; /** * Parses a CLI string value as a boolean. * * - `'true'` / `'1'` → `true` * - `'false'` / `'0'` → `false` * - `undefined` → `undefined` (flag not provided) * * @throws {Error} When the value is not a recognised boolean string. */ export declare function parseBoolean(val: string | undefined): boolean | undefined; /** * Parses a comma-separated string of integers into a `number[]`. * * Returns `undefined` when `val` is `undefined` (flag not provided). * * @throws {Error} When any token in the list is not a valid integer. */ export declare function parseNumberList(val: string | undefined): number[] | undefined; /** * Reads the package version from the adjacent `package.json`. * Falls back to `'Unknown'` on any I/O or parse error so that `--version` * always returns a printable string. */ export declare function getVersion(): string; /** * Main CLI entry point. * * Parses `process.argv`, validates all options up-front with actionable error messages, * and delegates to {@link pdfToPng}. Exported so it can be unit-tested without * spawning a child process. */ export declare function run(): Promise;