Goshin / Remove-PDF-Watermark

Remove embedded watermarks and color stains for scanned PDF. 去除扫描版 PDF 中的水印
MIT License
159 stars 53 forks source link

在window10下使用Python 3.8.2运行时报下面的错 #4

Closed yudigithub closed 4 years ago

yudigithub commented 4 years ago

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'

Goshin commented 4 years ago

只支持图片形式的扫描版的PDF文件

LeiYangGH commented 3 years ago

只支持图片形式的扫描版的PDF文件

better documented.