在window10下使用Python 3.8.2运行时报下面的错
Closed this issue · 2 comments
D:\script\Remove-PDF-Watermark-master\src>pdf-watermark-removal.py --skip=1 --output=output.pdf document.pdf
2020-03-24 12:50:01,669 - INFO - Processing page 1/1450
2020-03-24 12:50:01,685 - INFO - Processing page 2/1450
Traceback (most recent call last):
File "D:\script\Remove-PDF-Watermark-master\src\pdf-watermark-removal.py", line 127, in
main()
File "D:\script\Remove-PDF-Watermark-master\src\pdf-watermark-removal.py", line 117, in main
process_page(pdf, i, i < args.skip)
File "D:\script\Remove-PDF-Watermark-master\src\pdf-watermark-removal.py", line 66, in process_page
content = pdf.getPage(page_index)['/Resources']['/XObject'].getObject()
File "C:\Users\yudi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyPDF2\generic.py", line 516, in getitem
return dict.getitem(self, key).getObject()
KeyError: '/XObject'
只支持图片形式的扫描版的PDF文件
只支持图片形式的扫描版的PDF文件
better documented.