Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计提醒

pdf-visionPDF vision 文档

Agent Skill

pdf-vision 用于整理文档、README、Markdown 和说明材料,适合在 OpenClaw 中需要把零散信息整理成结构清晰的文档时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,093

周安装

89

GitHub Stars

公开资料未说明

下载量

733
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pdf-vision(PDF vision 文档)
来源仓库:https://github.com/lpq6/pdf-vision
安装命令:
openclaw skills install pdf-vision
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install pdf-vision

简介

从图像型 PDF 中提取文本,支持多视觉 API 回退机制。

  • 兼容 Xflow 与 ZhipuAI 的视觉模型接口。
  • 特别适用于扫描件或图片嵌入的 PDF 文档。
  • 需配置对应 API 密钥方可正常使用。pdf-vision 属于效率类 Skill,可作为该场景下的辅助能力补充。
  • 输出文本质量取决于原图清晰度与模型表现。

SKILL.md

name
pdf-vision
description
Extract text content from image-based/scanned PDFs using multiple vision APIs with automatic fallback. Supports Xflow (qwen3-vl-plus) and ZhipuAI (GLM-4.6V-Flash, GLM-5) vision models. This skill converts PDF pages to images and uses AI vision capabilities to extract structured text, tables, and content from scanned documents that cannot be processed with traditional text extraction methods.
license
MIT

PDF Vision Extraction Skill (Enhanced)

Overview

This skill handles image-based or scanned PDFs that contain no selectable text. It supports multiple vision APIs with automatic fallback:

Primary Models

  • Xflow: qwen3-vl-plus (your primary vision model)
  • ZhipuAI: glm-4.6v-flash (free vision model with fallback support)
  • Fallback: glm-5 (text-only, but may work with some image prompts)

Unlike traditional PDF text extraction tools (pdftotext, pdfplumber) which only work on text-based PDFs, this skill can process:

  • Scanned documents
  • Image-only PDFs
  • Photographed documents
  • Handwritten notes (with limitations)
  • Complex layouts with tables and formatting

Supported Models

Vision-Capable Models

ProviderModelTypeContextFree
Xflowqwen3-vl-plusVision + Text131K
ZhipuAIglm-4.6v-flashVision + Text32K
ZhipuAIglm-5Text-only*128K

Additional Text Models (for fallback)

ProviderModelContextFree
ZhipuAIglm-4-flash-250414128K
ZhipuAIcogview-3-flash32K

*Note: glm-5 is primarily text-only but may handle image prompts in some cases.

Prerequisites

1. API Configuration

Your OpenClaw must be configured with both providers:

Xflow Configuration (already set up):

  • models.providers.openai.baseUrl: https://apis.iflow.cn/v1
  • models.providers.openai.apiKey: Your Xflow API key

ZhipuAI Configuration (update token):

  • models.providers.zhipuai.baseUrl: https://open.bigmodel.cn/api/paas/v4
  • models.providers.zhipuai.apiKey: Your ZhipuAI API token

2. Required System Tools

  • pypdfium2 Python library (for PDF to image conversion)
  • curl (for API calls)
  • base64 (for image encoding)

3. Python Libraries (already installed)

pypdfium2

Usage

Automatic Fallback Mode (Default)

Uses Xflow first, falls back to ZhipuAI if needed:

./scripts/pdf_vision.py --pdf-path /path/to/document.pdf

Specific Model Selection

Force a specific model for cost or performance reasons:

# Use free GLM-4.6V-Flash model
./scripts/pdf_vision.py --pdf-path document.pdf --model zhipuai/glm-4.6v-flash

# Use specific Xflow model  
./scripts/pdf_vision.py --pdf-path document.pdf --model openai/qwen3-vl-plus

# Short form (auto-detects provider)
./scripts/pdf_vision.py --pdf-path document.pdf --model glm-4.6v-flash

Structured Data Extraction

./scripts/pdf_vision.py --pdf-path invoice.pdf --prompt "Extract as JSON: vendor, date, total" --model glm-4.6v-flash

Multi-page PDF Handling

# Process page 3 specifically
./scripts/pdf_vision.py --pdf-path book.pdf --page 3 --output page3.txt

Configuration

Environment Variables

The skill reads configuration from your OpenClaw config file (~/.openclaw/openclaw.json):

  • models.providers.openai.baseUrl & apiKey
  • models.providers.zhipuai.baseUrl & apiKey

Output Format

Returns extracted text content as a string. For structured data requests, the AI model will format output according to your prompt instructions.

Examples

Cost-Optimized Extraction (Free Model)

Command: --model glm-4.6v-flash Use case: When you want to use free vision capabilities Result: Good quality extraction at no cost

High-Quality Extraction (Premium Model)

Command: --model qwen3-vl-plus Use case: When you need maximum accuracy and complex layout understanding Result: Best possible extraction quality

Automatic Fallback (Recommended)

Command: No --model flag Use case: Production environments where reliability is key Result: Uses best available model, falls back gracefully

Model Comparison

GLM-4.6V-Flash (Free)

  • ✅ Completely free
  • ✅ Good Chinese text recognition
  • ✅ Decent table structure preservation
  • ⚠️ Lower context window (32K vs 131K)
  • ⚠️ May struggle with very complex layouts

Qwen3-VL-Plus (Premium)

  • ✅ Superior image understanding
  • ✅ Excellent table and structure recognition
  • ✅ Larger context window (131K)
  • ✅ Better handling of mixed languages
  • ❌ Requires paid API access

Limitations

  • Single page processing: Currently processes one page at a time
  • Image quality: Better results with higher resolution scans
  • Complex layouts: May struggle with very dense or overlapping text
  • Handwriting: Limited accuracy with handwritten content
  • File size: Large PDFs may exceed API token limits

Technical Implementation

The skill follows this workflow:

  1. PDF to Image: Converts specified PDF page to PNG using pypdfium2
  2. Model Selection: Chooses model based on user preference or fallback logic
  3. API Call: Sends image + prompt to selected vision API endpoint
  4. Response Parsing: Extracts and returns the AI-generated text content
  5. Fallback: If primary model fails, tries alternative models

For debugging, temporary files are created in /tmp/:

  • /tmp/pdf_vision_page.png - converted image
  • /tmp/pdf_vision_payload_*.json - API request payload
  • /tmp/pdf_vision_response_*.json - API response

Integration Notes

This skill complements the standard pdf skill:

  • Use pdf skill for text-based PDFs (faster, no API cost)
  • Use pdf-vision skill for image-based/scanned PDFs (requires vision API)

Both skills can be used together in a fallback pattern:

  1. Try pdf skill first
  2. If no text extracted, fall back to pdf-vision skill

Cost Optimization Tips

  1. Use GLM-4.6V-Flash for routine tasks - it's free and quite capable
  2. Reserve Qwen3-VL-Plus for complex documents - when you need maximum accuracy
  3. Test both models on your document types - choose based on your quality requirements
  4. Monitor API usage - track which models you're using most

Update Your GLM API Token

Replace the placeholder token in your config:

# Replace YOUR_ACTUAL_GLM_TOKEN with your real token
sed -i 's/YOUR_GLM_API_TOKEN_HERE/YOUR_ACTUAL_GLM_TOKEN/g' ~/.openclaw/openclaw.json

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

87.59%
按下载量换算642

安全审计

VirusTotal

未展示

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills