/** * 目录提取器 - 使用外部工具实现 * * 依赖 poppler-utils 的 pdfinfo 和 pdftk * 安装: * - Ubuntu/Debian: sudo apt-get install poppler-utils pdftk * - macOS: brew install poppler pdftk-java * - Windows: 下载相应工具 */ import type { TOCItem } from '../types/index.js'; export declare class TOCExtractorExternal { private pdfinfoPath; private pdftkPath; /** * @param pdftkPath - pdftk 可执行文件的完整路径(可选) * @param pdfinfoPath - pdfinfo 可执行文件的完整路径(可选) */ constructor(pdftkPath?: string, pdfinfoPath?: string); /** * 检查工具是否可用 */ isAvailable(): Promise<{ pdfinfo: boolean; pdftk: boolean; }>; /** * 执行命令(支持 Windows PowerShell) */ private execCommand; /** * 提取目录 * * @param pdfPath - PDF 文件路径 * @returns 目录项数组 */ extract(pdfPath: string): Promise; /** * 使用 pdftk 提取目录 */ private extractWithPdftk; /** * 使用 pdfinfo 提取目录(功能有限) */ private extractWithPdfinfo; /** * 构建层级结构 */ private buildHierarchy; /** * 获取使用说明 */ getUsageInfo(): string; } //# sourceMappingURL=toc-extractor-external.d.ts.map