f4fffb77 by Gruel

first commit

0 parents
.idea/
\ No newline at end of file
# PDF转图片脚本
## 主要处理逻辑
- 提取PDF页面中的图片对象
- 图片对象数目为0(如电子账单),保存整个页面为png图片
- 图片对象数目为1
- 大图,保存图片对象
- 小图(如电子账单盖章),保存整个页面为png图片
- 图片对象数目大于1
- 多大图,保存图片对象
- 多碎图,根据宽高突变位置分组,拼接合并后保存
- 其他特殊情况:保存整个页面为png图片
## 用法
- python3.6+
- `pip install -r requirements`
- `python pdf_to_img.py pdf_path [img_path]`
| 参数 | 是否必须 | 说明 | 缺省值 |
| ---- | ---- | ---- | ---- |
| pdf_path | 是 | PDF文件或目录路径 | - |
| img_path | 否 | 图片保存路径 | PDF文件路径 |
\ No newline at end of file
Pillow==7.2.0
PyMuPDF==1.17.0
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!