Traceback (most recent call last):
File "d:\Software\OfficeTools\doc88Download-master\doc88.py", line 150, in <module>
pic2pdf(file_name)
File "d:\Software\OfficeTools\doc88Download-master\doc88.py", line 141, in pic2pdf
pdfbytes = imgdoc.convertToPDF() # 使用图片创建单页的 PDF
^^^^^^^^^^^^^^^^^^^
AttributeError: 'Document' object has no attribute 'convertToPDF'. Did you mean: 'convert_to_pdf'?
Traceback (most recent call last):
File "d:\Software\OfficeTools\doc88Download-master\doc88.py", line 150, in <module>
pic2pdf(file_name)
File "d:\Software\OfficeTools\doc88Download-master\doc88.py", line 143, in pic2pdf
doc.insertPDF(imgpdf) # 将当前页插入文档
^^^^^^^^^^^^^
AttributeError: 'Document' object has no attribute 'insertPDF'. Did you mean: 'insert_pdf'?
感谢您提供的代码解燃眉之急!运行时出现了两个问题:
1.
doc88.py的第141行,需要修改为
pdfbytes = imgdoc.convert_to_pdf() # 使用图片创建单页的 PDF
。2.
doc88.py的第143行,需要修改为
doc.insert_pdf(imgpdf) # 将当前页插入文档
。再次感谢!