一站式文档处理工具,覆盖绝大多数办公文档处理场景,不需要安装多个软件,一个工具搞定所有文档需求。
支持所有常见文档格式互转:
源格式支持转换到的格式PDFWord、Excel、PPT、图片、TXT、Markdown、HTMLWordPDF、HTML、Markdown、TXT、图片ExcelPDF、CSV、HTML、MarkdownPPTPDF、图片、HTML、Markdown图片PDF、Word、TXT、Markdown(OCR识别文字)MarkdownPDF、Word、HTML、PPT扫描件/PDF图片版可编辑Word、Excel、TXT(OCR识别)
powershell
# 格式转换:把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 右下角
首次使用前安装依赖:
powershell
pip install python-docx PyPDF2 pillow pytesseract pandas openpyxl
安装完成后所有功能立即可用。