I make an app that can read PDF using pdfminer.
Application is OK when development.
After that, I package to .exe file using pyinstaller. But read result is not the same with it in development.
In detail, it can not read **LTText LTTextBoxHorizontal so I can not get extracted text.
Any one know about this issue, please help me.
Logs in development
Logs after I do pyinstaller
Python 3.9.1
Pyinstaller 4.2
pdfminer.six==20201018
six==1.15.0
Command: pyinstaller --onefile file.py
Related source:
for index, page in pdf_object:
# TODO: Only read last page - maybe change if PDF file change
if index == number_of_page - 1:
# read the page into a layout object
self.interpreter.process_page(page)
layout = self.device.get_result()
print("Size of this page (%d, %d)" % (layout.x1, layout.y1))
print("len = %d" % len(layout._objs))
self.parse_obj(layout._objs)
def parse_obj(self, lt_objs):
# loop over the object list
print("Go loop")
print(lt_objs)
i = 0
for obj in lt_objs:
i += 1
print("In loop %d" % i)
question from:
https://stackoverflow.com/questions/65843216/pdfminer-can-not-read-lttext-after-pyinstaller 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…