07 2021 档案
摘要:通过发票左上角的二维码信息,获取发票的关键信息,只需将图片格式的电子发票或扫描后的发票图片传入即可. 测试结果如下: * 增值税电子普通发票:`{'发票代码': '031xxxxxx311', '发票号码': '74xxxx17', '不含税金额': '13665.98', '开票日期': '202
阅读全文
摘要:下面示例代码,是将横向纸张旋转为纵向(根据纸张大小判断纸张方向) 方法一:使用`PyPDF2`库 ```python from PyPDF2 import PdfFileWriter, PdfFileReader def page_rotation(old_file, new_file): """
阅读全文
摘要:实现WPS文件转PDF,需要安装金山WPS ```python import os from win32com.client import Dispatch def wps_et_to_pdf(file, pdf_file=None): """ wps/et 转 PDF :param file: w
阅读全文
摘要:import os from PIL import Image from reportlab.pdfgen import canvas def image_resize(img, *args, multiple=None): """ 图片缩放 如果按倍数缩放图片,则不用传args, 否则要传入需要缩
阅读全文