2022年7月18日

python读取文件名

摘要: xx=os.path.splitext(r'C:\Users\mydell\Desktop\mypdfocr\123.pdf') print(xx[0].split('\\')[-1]) 阅读全文

posted @ 2022-07-18 17:11 耀扬 阅读(91) 评论(0) 推荐(0) 编辑

'Document' object has no attribute 'pageCount',_writeIMG() missing 1 required positional argument: 'format'问题

摘要: python中想用fitz库,把pdf转为图片。 网上找了资料发现。均报错 'Document' object has no attribute 'pageCount' 没啥 肯定是库升级了,函数改名了。 首先 考虑 使用 dir() 方法查找一下该对象的所有的属性和方法 果然改名了 # 安装fit 阅读全文

posted @ 2022-07-18 16:55 耀扬 阅读(7170) 评论(0) 推荐(0) 编辑

导航