pdf_to_docx icon indicating copy to clipboard operation
pdf_to_docx copied to clipboard

运行image_process.py报错

Open zhougeAI opened this issue 1 year ago • 1 comments

AttributeError: 'Document' object has no attribute 'pageCount'

Traceback (most recent call last): File "C:\Users\Chenlz\Desktop\pdf_to_docx\src\pdf_doc\pdf_recovery_doc.py", line 121, in pdf2doc(pdf_path) File "C:\Users\Chenlz\Desktop\pdf_to_docx\src\pdf_doc\pdf_recovery_doc.py", line 35, in pdf2doc pdf_image(pdf_file, image_path) File "C:\Users\Chenlz\Desktop\pdf_to_docx\src\util\image_process.py", line 15, in pdf_image for pg in range(pdf_doc.pageCount): AttributeError: 'Document' object has no attribute 'pageCount'

zhougeAI avatar Oct 24 '24 07:10 zhougeAI

问题找到了,是新版本的fitz库的方法发生了变化,应该改为page_count

zhougeAI avatar Oct 24 '24 07:10 zhougeAI