pdf转图片
前提
环境ubuntu22.04 lts,windows没有测试过。
今天想用wps pdf转换一下为图片,发现要收费!!!!为了省钱,只好撸代码了。说实话,这年头赚钱真的不容易,特别是程序员,但是我是一个运维也算半个程序员。
pip install pdf2image
sudo apt-get install poppler-utils
代码
将PDF文件的每一页转换为PNG图片:
from pdf2image import convert_from_path
import os
def pdf_to_images(pdf_path, output_folder):
原文地址:https://blog.csdn.net/u010674101/article/details/140121796
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!