python 删除pdf 图片
import os import fitz doc = fitz.open('D:\888\888\\6.pdf') imgcount = 0for page in doc: imageList = page.get_images() print(imageList) i = 0 for imginfo in imageList: if 'ICCBased' in str(imginfo): print("imginfo", imginfo) doc._deleteObject(imageList[i][0]) i = i + 1 doc.save('222.pdf')
如果觉得对您有帮助,麻烦您点一下推荐,谢谢!
好记忆不如烂笔头
好记忆不如烂笔头