python 20行程序实现jpg转pdf 安装:pip install reportlab -ihttp://pypi.douban.com/simple/--trusted-hostpypi.douban.com
conver_img() 补充:反过来,将jpg转PDF 参考https://pythonjishu.com/qmluqyxkazvkzuf/ 1 2 3 4 5 6 7 8 import img2pdf fromPIL import Image def image_to_pdf(image_filename, pdf_filename): with open(pdf_filename,"wb")asf: img = Image.open(image_filename) pdf_bytes = img2pdf.convert...