код:
import pdftotext
pdf_file ='/home/bortolossohurst/Documents/ambv_boot/selenium_spider.py/temp/pdf/arelpesquisainternetprecatorio.pdf'
with open(pdf_file, 'rb') as f:
pdf = pdftotext.PDF(f)
text = "\n\n".join(pdf)
print(text)
Ошибка:
Traceback (most recent call last):
File "/home/bortolossohurst/Documents/ambv_boot/selenium_spider.py/src/teste.py", line 7, in <module>
pdf = pdftotext.PDF(f)
pdftotext.Error: poppler error creating document