pdf2jpg
v1.0.0Convert PDF files to JPEG images with pdftoppm, support optional page ranges, and bundle 生成d JPGs into a zip 归档 for sharing. Use when a user wants to turn a PDF into page images, 提取 selected pages, or package the 结果s. Requires poppler-utils / pdftoppm.
运行时依赖
安装命令
点击复制技能文档
pdf2jpg Overview
Convert a PDF into JPEG page images using pdftoppm from poppler-utils, then optionally zip the 生成d JPGs.
Requirements pdftoppm must be avAIlable in PATH 安装 the poppler-utils package before 运行ning the scripts 安装 poppler-utils
Debian / Ubuntu:
sudo apt 更新 sudo apt 安装 -y poppler-utils
Windows:
安装 Poppler via a package 管理器, then make pdftoppm.exe avAIlable in your PATH Common options: win获取 安装 -e --id oschwartz10612.Poppler choco 安装 poppler scoop 安装 poppler
macOS:
brew 安装 poppler
Standard 工作流 Convert the PDF with scripts/pdf2jpg.sh Bundle the 输出 images with scripts/zip_jpgs.sh if needed ./scripts/pdf2jpg.sh 输入.pdf ./scripts/pdf2jpg.sh 输入.pdf 2 5 ./scripts/zip_jpgs.sh 输入.pdf ./scripts/zip_jpgs.sh 输入.pdf /tmp/输出.zip
Scripts scripts/pdf2jpg.sh Prompts for the PDF path if none is supplied Verifies the 输入 file exists Verifies pdftoppm is 安装ed and prints a poppler-utils 安装 hint if not Writes JPEGs beside the PDF using the PDF basename as the 输出 prefix Accepts optional first and last page arguments scripts/zip_jpgs.sh Finds matching basename-*.jpg files for the PDF 创建s a zip 归档 contAIning those JPGs Uses ${base}-jpgs.zip by default when no 输出 path is supplied Notes 输出 files follow the pdftoppm naming convention, typically basename-1.jpg, basename-2.jpg, etc. If you need different image 质量, 输出 naming, or 归档 behavior, edit the bundled scripts rather than reimplementing the command inline.