MCPInstall

pdf-to-image-preview

将PDF文件的每一页转换为图片文件;支持自定义图片格式(PNG/JPG)和分辨率;适用于文档处理、图片化存档等场景

Installs
57
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/wuchubuzai2018/expert-skills-hub --skill pdf-to-image-preview
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads pdf-to-image-preview automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

PDF转图片Skill

任务目标

  • 本Skill用于:将PDF文件的每一页转换为独立的图片文件
  • 能力包含:PDF文件解析、图片格式转换(PNG/JPG)、可调分辨率输出
  • 触发条件:用户需要将PDF转换为图片、提取PDF页面、图片化PDF内容等场景

前置准备

  • 依赖说明:scripts脚本所需的依赖包及版本
    pymupdf>=1.23.0
    

操作步骤

  • 标准流程:
    1. 准备PDF文件

      • 确认PDF文件路径(使用 ./ 表示当前工作目录)
      • 例如:./document.pdf
    2. 执行转换

      • 调用脚本将PDF文件的每一页转换为图片
      • 命令示例:
        python scripts/convert_pdf_to_images.py \
          --input ./document.pdf \
          --output-dir ./images
        
      • 可选参数:
        • --image-format: 图片格式,支持 png 或 jpg,默认为 png
        • --dpi: 图片分辨率(DPI),默认为 200
        • --zip: 生成ZIP压缩包
        • --zip-output: ZIP压缩包输出路径(默认:images.zip)
    3. 查看输出

      • 图片文件保存在指定的输出目录中
      • 文件命名格式:page_001.png、page_002.png...
      • 可选择是否生成ZIP压缩包

资源索引

  • 必要脚本:见 scripts/convert_pdf_to_images.py(用途与参数:PDF转图片脚本)

注意事项

  • 输入PDF文件必须存在且可读
  • 输出目录必须具有写入权限
  • PDF页数限制:暂支持100页以内的PDF文件,超过100页请拆分后转换
  • 大型PDF文件转换可能需要较长时间,请耐心等待

故障排查

  • 脚本找不到错误:确保在Skill目录下执行,或使用相对路径 scripts/xxx.py
  • Python版本问题:确保使用Python 3.6或更高版本
  • 依赖缺失:执行 pip install pymupdf>=1.23.0 安装依赖
  • 页数超限错误:PDF文件超过100页,请使用PDF工具拆分为多个小文件

使用示例

示例1:基本转换(PNG格式)

python scripts/convert_pdf_to_images.py \
  --input ./report.pdf \
  --output-dir ./images

示例2:使用JPG格式

python scripts/convert_pdf_to_images.py \
  --input ./document.pdf \
  --output-dir ./images \
  --image-format jpg

示例3:高分辨率输出

python scripts/convert_pdf_to_images.py \
  --input ./document.pdf \
  --output-dir ./images \
  --dpi 300

示例4:生成ZIP压缩包

python scripts/convert_pdf_to_images.py \
  --input ./document.pdf \
  --output-dir ./images \
  --zip \
  --zip-output ./images.zip

示例5:完整配置

python scripts/convert_pdf_to_images.py \
  --input ./report.pdf \
  --output-dir ./images \
  --image-format jpg \
  --dpi 200 \
  --zip

FAQ

What does the pdf-to-image-preview skill do?

将PDF文件的每一页转换为图片文件;支持自定义图片格式(PNG/JPG)和分辨率;适用于文档处理、图片化存档等场景

How do I install pdf-to-image-preview?

Run npx skills add https://github.com/wuchubuzai2018/expert-skills-hub --skill pdf-to-image-preview in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pdf-to-image-preview/ (personal) or .claude/skills/pdf-to-image-preview/ (project).

Which AI agents can use pdf-to-image-preview?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is pdf-to-image-preview safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains pdf-to-image-preview?

It is published by wuchubuzai2018 in wuchubuzai2018/expert-skills-hub. It has 57 recorded installs.

More from wuchubuzai2018/expert-skills-hub

View all →

wechat-article-search

wuchubuzai2018/expert-skills-hub

搜索微信公众号文章技能。通过微信搜索获取文章列表,覆盖科技/AI、社会热点、财经、教育、职场等各类中文资讯;可按关键词检索并返回标题、概要、发布时间、来源公众号与链接。当用户需要查找微信公众号文章、整理参考资料或快速获取文章信息时使用此技能。

Docs & Writing1.6K installs

toutiao-news-trends

wuchubuzai2018/expert-skills-hub

Open the skill to read its SKILL.md instructions.

351 installs

nano-banana-pro-image-gen

wuchubuzai2018/expert-skills-hub

Open the skill to read its SKILL.md instructions.

Media & Creative115 installs

apiyi-gpt-image-2-gen

wuchubuzai2018/expert-skills-hub

Open the skill to read its SKILL.md instructions.

Media & Creative79 installs

csdn-article-publish

wuchubuzai2018/expert-skills-hub

csdn blog article publish skills,CSDN博客文章生成与发布技能。实现CSDN博客网站的文章的创建、保存草稿、更新和发布。适用场景:(1) 用户请求"帮我写一篇XX文章,保存到CSDN" (2) 用户请求"更新我CSDN上的某篇文章" (3) 用户请求"发布我的CSDN文章" 时调用此技能

Docs & Writing73 installs

juejin-article-trends

wuchubuzai2018/expert-skills-hub

Open the skill to read its SKILL.md instructions.

Docs & Writing71 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs