Design & media

Pdf To Image Preview

Try it

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

What it does

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

The skill document

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

Related skills

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

More from wuchubuzai2018

Browse all skills

图片生成技能,当用户需要生成图片、视觉信息图、创建图像、编辑/修改/调整已有图片时使用此技能。基于中国的API易代理站(https://api.apiyi.com/)的NanoBananaPro模型的图片生成服务,无需访问外网。支持10种宽高比的图片比例(`1:1`、`16:9`、`9:16`、`4:3`、`3:...

by wuchubuzai201896 installs1 stars

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

by wuchubuzai2018499 installs33 stars

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

by wuchubuzai201828 installs1 stars

获取2026年米兰冬奥会数据技能,包括奖牌榜排名、现场新闻报道和赛程安排。从百度体育网页抓取实时的奖牌排行榜信息、最新新闻资讯和比赛赛程。当用户需要获取米兰冬奥会需求,需要查询冬奥会奖牌榜、了解各国奖牌数量、获取现场新闻、查看赛程安排时使用此技能。能够根据指定时间(今天、明天、yyyy-MM-dd日期格式)或指定运动项目获取赛程安排。A skill for retrieving 2026 Milan Winter Olympics data, including medal standings, live news reports, and competition schedules. Scrapes real-time medal rankings, latest news, and match schedules from Baidu Sports. Use this skill when users need to query Winter Olympics medal standings, check medal counts by country, get live news, or view competition schedules.

by wuchubuzai201843 installs

图片生成技能,当用户需要生成图片、视觉信息图、创建图像、编辑/修改/调整已有图片时使用此技能。基于中国的API易代理站(https://api.apiyi.com/)的NanoBanana2模型的图片生成服务,无需访问外网。支持14种宽高比的图片比例(`1:1`、`16:9`、`9:16`、`4:3`、`3:4`...

by wuchubuzai201828 installs

图片生成技能,当用户需要生成图片、视觉信息图、创建图像、编辑/修改/调整已有图片时使用此技能。基于API易平台(https://api.apiyi.com/)的ChatGPT Image 2模型(gpt-image-2)的官方正式版图片生成服务。该模型支持精确的尺寸/画质控制(含4K),按token计费。与gpt...

by wuchubuzai201816 installs