Install
openclaw skills install document-pro-cn专业文档处理工具包,支持格式转换、OCR识别、批量处理、公文排版、文档比对、内容提取、水印添加等全功能文档处理,支持所有常见文档格式。
openclaw skills install document-pro-cn一站式文档处理工具,覆盖绝大多数办公文档处理场景,不需要安装多个软件,一个工具搞定所有文档需求。
支持所有常见文档格式互转:
| 源格式 | 支持转换到的格式 |
|---|---|
| Word、Excel、PPT、图片、TXT、Markdown、HTML | |
| Word | PDF、HTML、Markdown、TXT、图片 |
| Excel | PDF、CSV、HTML、Markdown |
| PPT | PDF、图片、HTML、Markdown |
| 图片 | PDF、Word、TXT、Markdown(OCR识别文字) |
| Markdown | PDF、Word、HTML、PPT |
| 扫描件/PDF图片版 | 可编辑Word、Excel、TXT(OCR识别) |
# 格式转换:把PDF转成Word
document-pro convert --input "D:\文档\报告.pdf" --output "D:\文档\报告.docx" --to docx
# OCR识别:把扫描件PDF转成可编辑Word
document-pro ocr --input "D:\文档\扫描件.pdf" --output "D:\文档\可编辑版.docx"
# 批量转换:把整个文件夹的PDF转成Word
document-pro batch-convert --input-dir "D:\所有PDF" --output-dir "D:\转成Word" --to docx
# 公文排版:把普通Word转成标准公文格式
document-pro official-format --input "D:\通知.docx" --output "D:\标准格式通知.docx" --type 通知
# 文档比对:对比两个版本的差异
document-pro compare --old "D:\报告v1.docx" --new "D:\报告v2.docx" --output "D:\差异比对报告.docx"
# 批量添加水印
document-pro watermark --input-dir "D:\所有文档" --output-dir "D:\加水印后" --text "内部资料 禁止外泄" --opacity 0.3 --position 右下角
# PDF拆分:把一个PDF拆分成多个
document-pro pdf-split --input "D:\大文档.pdf" --output-dir "D:\拆分后" --per-pages 10
# PDF合并:把多个PDF合并成一个
document-pro pdf-merge --inputs "D:\1.pdf,D:\2.pdf,D:\3.pdf" --output "D:\合并后.pdf"
| 参数 | 说明 | 示例 |
|---|---|---|
| --input | 输入文件路径 | --input "D:\报告.pdf" |
| --output | 输出文件路径 | --output "D:\报告.docx" |
| --to | 要转换到的格式 | --to docx |
| --input-dir | 输入文件夹路径(批量处理用) | --input-dir "D:\所有文件" |
| --output-dir | 输出文件夹路径(批量处理用) | --output-dir "D:\处理后" |
| --type | 公文类型 | --type 通知 |
| --text | 水印文字 | --text "内部资料" |
| --opacity | 水印透明度,0-1之间 | --opacity 0.3 |
| --position | 水印位置:左上角/右上角/左下角/右下角/居中 | --position 右下角 |
首次使用前安装依赖:
pip install python-docx PyPDF2 pillow pytesseract pandas openpyxl
安装完成后所有功能立即可用。