|
|
@ -40,7 +40,8 @@ def transform(): |
|
|
|
print(content["hocr"]) |
|
|
|
urllib.request.urlretrieve(content["pdf"], "static/pdf/input.pdf") |
|
|
|
|
|
|
|
hocr = subprocess.call("pdftotree static/pdf/input.pdf -o static/hocr/gynaikoktonia.hocr", shell=True) |
|
|
|
# the outcome of this hocr doesnt write well on the pdf, its structure doesn't fit |
|
|
|
# hocr = subprocess.call("pdftotree static/pdf/input.pdf -o static/hocr/gynaikoktonia.hocr", shell=True) |
|
|
|
|
|
|
|
result = subprocess.call("python3 hocrtransformpdf.py -i static/images/blank.png static/hocr/gynaikoktonia.hocr static/pdf/result.pdf", shell=True) |
|
|
|
|
|
|
|