← 返回
未分类 中文

pdf2jpg

Convert PDF files to JPEG images with pdftoppm, support optional page ranges, and bundle generated JPGs into a zip archive for sharing. Use when a user wants...
使用 pdftoppm 将 PDF 文件转换为 JPEG 图片,支持可选页面范围,生成的 JPG 打包成 ZIP 存档以便分享。适用于用户想要...
luohongq luohongq 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 429
下载
💾 11
安装
1
版本
#latest

概述

pdf2jpg

Overview

Convert a PDF into JPEG page images using pdftoppm from poppler-utils, then optionally zip the generated JPGs.

Requirements

  • pdftoppm must be available in PATH
  • Install the poppler-utils package before running the scripts

Install poppler-utils

  • Debian / Ubuntu:

```bash

sudo apt update

sudo apt install -y poppler-utils

```

  • Windows:
  • Install Poppler via a package manager, then make pdftoppm.exe available in your PATH
  • Common options:
  • winget install -e --id oschwartz10612.Poppler
  • choco install poppler
  • scoop install poppler
  • macOS:

```bash

brew install poppler

```

Standard workflow

  1. Convert the PDF with scripts/pdf2jpg.sh
  2. Bundle the output images with scripts/zip_jpgs.sh if needed
./scripts/pdf2jpg.sh input.pdf
./scripts/pdf2jpg.sh input.pdf 2 5
./scripts/zip_jpgs.sh input.pdf
./scripts/zip_jpgs.sh input.pdf /tmp/output.zip

Scripts

scripts/pdf2jpg.sh

  • Prompts for the PDF path if none is supplied
  • Verifies the input file exists
  • Verifies pdftoppm is installed and prints a poppler-utils install hint if not
  • Writes JPEGs beside the PDF using the PDF basename as the output prefix
  • Accepts optional first and last page arguments

scripts/zip_jpgs.sh

  • Finds matching basename-*.jpg files for the PDF
  • Creates a zip archive containing those JPGs
  • Uses ${base}-jpgs.zip by default when no output path is supplied

Notes

  • Output files follow the pdftoppm naming convention, typically basename-1.jpg, basename-2.jpg, etc.
  • If you need different image quality, output naming, or archive behavior, edit the bundled scripts rather than reimplementing the command inline.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 04:46 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 464 📥 154,819
office-efficiency

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 932 📥 187,279
office-efficiency

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 387 📥 147,139