poinikos.wordmord-ur.la/parsepdf.py

9 lines
227 B
Python
Raw Normal View History

2022-04-01 11:56:47 +02:00
#!venv/bin python3
import pdftotree
def hocr_result():
hocr_result = pdftotree.parse("static/pdf/downloaded.pdf")
with open('static/hocr/downloaded.hocr', 'w') as f:
f.write(hocr_result)
return hocr_result