screenshot-tool

网页截图 + 文档截图工具。支持网页全页截图、PPT/Word/Excel/PDF 转高清图片。保留原始样式,300 DPI 高清输出。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "screenshot-tool" with this command: npx skills add 834948655/screenshot-tool

Screenshot Tool - 网页 & 文档截图工具

支持网页截图和文档转高清图片,保留原始样式。

功能

功能说明
网页截图使用 headless 浏览器截图,支持整页、单页
文档转图PPT/Word/Excel/PDF 转 300 DPI 高清图片
高清输出4000×2250 像素,适合打印和展示

依赖安装

必需依赖

依赖用途安装命令
agent-browser网页截图npm install -g agent-browser && agent-browser install
LibreOffice文档转 PDFsudo apt-get install -y libreoffice-impress libreoffice-writer libreoffice-calc
poppler-utilsPDF 处理sudo apt-get install -y poppler-utils
Python 库PDF 转图片pip3 install pdf2image pillow

安装步骤

# 1. 安装 agent-browser(网页截图必需)
npm install -g agent-browser
agent-browser install
agent-browser install --with-deps  # 如需要系统依赖

# 2. 安装 LibreOffice(文档转换必需)
sudo apt-get install -y libreoffice-impress libreoffice-writer libreoffice-calc

# 3. 安装 poppler-utils(PDF 处理必需)
sudo apt-get install -y poppler-utils

# 4. 安装 Python 依赖
pip3 install pdf2image pillow

# 5. 安装中文字体(可选,用于中文文档)
sudo apt-get install -y fonts-wqy-zenhei fonts-wqy-microhei fonts-noto-cjk

验证安装

# 验证 agent-browser
agent-browser --version

# 验证 LibreOffice
libreoffice --version

# 验证 poppler
which pdftoppm pdfinfo

使用方法

1. 网页截图

# 截图单个网页
python3 skills/screenshot-tool/scripts/web_screenshot.py --url "https://example.com" --output page.png

# 截图并滚动(长页面)
python3 skills/screenshot-tool/scripts/web_screenshot.py --url "https://example.com" --full-page --output page.png

2. 文档转图片

# PPT/Word/Excel/PDF 转图片
python3 skills/screenshot-tool/scripts/doc_screenshot.py --input file.pptx --output-dir ./images

# 指定 DPI(默认 300)
python3 skills/screenshot-tool/scripts/doc_screenshot.py --input file.pdf --dpi 200 --output-dir ./images

3. 使用 agent-browser 截图

# 打开网页
agent-browser open "https://example.com" --timeout 60000

# 截图
agent-browser screenshot output.png --full

# 关闭浏览器
agent-browser close

支持的格式

文档格式

格式扩展名状态
PowerPoint.pptx, .ppt✅ 支持
Word.docx, .doc✅ 支持
Excel.xlsx, .xls✅ 支持
PDF.pdf✅ 支持
OpenDocument.odp, .odt, .ods✅ 支持

网页截图

方式说明依赖
agent-browser使用 headless Chromeagent-browser
OpenClaw browser内置浏览器工具OpenClaw 内置

输出规格

参数默认值说明
DPI300分辨率
格式PNG图片格式
尺寸4000×225016:9 比例

示例

示例1:网页截图

# 截图京东首页
python3 skills/screenshot-tool/scripts/web_screenshot.py \
  --url "https://www.jd.com" \
  --output jd_homepage.png \
  --wait 5

示例2:PPT 转图片

# 转换整个 PPT
python3 skills/screenshot-tool/scripts/doc_screenshot.py \
  --input presentation.pptx \
  --output-dir ./slides \
  --dpi 300

示例3:PDF 转图片

# 转换 PDF 前5页
python3 skills/screenshot-tool/scripts/doc_screenshot.py \
  --input document.pdf \
  --output-dir ./pages \
  --first-page 1 \
  --last-page 5

流程说明

文档转图片流程

PPT/Word/Excel → LibreOffice → PDF → pdf2image → PNG (300 DPI)
                                         ↑
                                    依赖: poppler-utils

网页截图流程

URL → agent-browser (headless Chrome) → Screenshot → PNG
              ↑
        依赖: agent-browser CLI

故障排除

LibreOffice 转换失败

# 检查 LibreOffice 安装
libreoffice --version

# 手动转换测试
libreoffice --headless --convert-to pdf file.pptx

pdf2image 错误

# 检查 poppler 安装
which pdftoppm pdfinfo

# 重新安装
sudo apt-get install -y poppler-utils

中文字体显示问题

# 安装中文字体
sudo apt-get install -y fonts-wqy-zenhei fonts-wqy-microhei fonts-noto-cjk

文件结构

skills/screenshot-tool/
├── SKILL.md              # 本文件
├── scripts/
│   ├── web_screenshot.py    # 网页截图脚本
│   └── doc_screenshot.py    # 文档转图片脚本
└── README.md             # 详细说明

License

MIT

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Joke Api

Access diverse jokes by category, language, and type with filters for safe content using the free JokeAPI without requiring registration or an API key.

Registry SourceRecently Updated
General

Stripe Manager

Error: --action required. Use when you need stripe manager capabilities. Triggers on: stripe manager, key, customer-id, amount, currency, desc.

Registry SourceRecently Updated
General

Doc Summarize Pro

Enhanced document summarizer. Smart summary, bullet extraction, executive summary, chapter breakdown, multi-doc comparison, translate+summarize, action item...

Registry SourceRecently Updated
General

GI API Design FastAPI

Design and implement RESTful API endpoints following FastAPI best practices. Use when creating new API routes, designing request/response schemas, or when th...

Registry SourceRecently Updated