I had written the following code in Google Colab. Earlier it was working fine but now it is showing attribute error('Page' has no attribute 'Rotation Matrix') at the convert line.
Content of Apollo 2019 file-
ORDINARY BUSINESS:
Please provide any solution if anyone knows.
!pip install python-docx
!pip install pdf2docx
from pdf2docx import Converter
from docx import Document
from google.colab import drive
drive.mount('/content/drive/')
file_name='/content/drive/MyDrive/Colab Notebooks/PDF files/Apollo 2019.pdf'
word_name='Apollo 2019.docx'
cv=Converter(file_name)
cv.convert(word_name)
cv.close()
--> 279 Element.set_rotation_matrix(self.fitz_page.rotationMatrix) 280 281 return raw_layout
AttributeError: 'Page' object has no attribute 'rotationMatrix'
This is the error which I am getting.
This is not a fix, per se. But I went in and commented out the line 279 in the RawPage.py file. After that, pdf2docx still executed properly and returned a file. Good luck
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.