← 返回
效率工具 中文

pdf2img

Convert multi-page PDFs into a single vertical long image by concatenating all pages. Use when the user asks to convert PDF to long image, combine PDF pages...
将多页PDF的所有页面拼接转换为一张垂直长图。适用于用户要求将PDF转长图、合并PDF页面等场景。
kieferhuan
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 563
下载
💾 44
安装
1
版本
#latest

概述

PDF to Long Image

Convert multi-page PDFs into a single vertical long image, useful for sharing documents

as scrolling images or creating visual summaries.

Quick Start

# Basic usage
uv run python ~/.openclaw/skills/pdf-to-long-image/scripts/pdf_to_long_image.py input.pdf

# Specify output path
uv run python ~/.openclaw/skills/pdf-to-long-image/scripts/pdf_to_long_image.py input.pdf output.png

# Higher resolution
uv run python ~/.openclaw/skills/pdf-to-long-image/scripts/pdf_to_long_image.py input.pdf output.png --scale 3

How It Works

  1. Opens the PDF using pymupdf (fitz)
  2. Renders each page at the specified scale (default 2x for clarity)
  3. Vertically concatenates all pages into a single image
  4. Saves as optimized PNG

Options

OptionDefaultDescription
------------------------------
input(required)Path to the PDF file
outputinput_long.pngOutput image path
--scale2.0Render scale factor (higher = more detail)

Dependencies

The script requires these packages (install with uv):

uv pip install pymupdf pillow

Example Output

Converting 32 pages from document.pdf...
  Page 1/32: 1684x1190
  Page 2/32: 1684x1190
  ...
Done! Saved to: document_long.png
  Dimensions: 1684x38112 pixels
  File size: 11.23 MB

Script Location

~/.openclaw/skills/pdf-to-long-image/scripts/pdf_to_long_image.py

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 21:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 274 📥 114,716
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 444 📥 226,096
productivity

Word / DOCX

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