Revert "Since PyMuPDF 1.13.3 corrupts text, pin 1.12.5 and work around it"

This reverts commit b0ce7c63dd.
This commit is contained in:
James R. Barlow
2018-05-10 16:27:17 -07:00
parent a57ecede78
commit 63032d304d
2 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -251,7 +251,7 @@ setup(
'ruffus == 2.6.3', # pinned - ocrmypdf implements a 2.6.3 workaround
],
extras_require={
'fitz': ['PyMuPDF == 1.12.5'],
'fitz': ['PyMuPDF >= 1.13.3'],
},
tests_require=tests_require,
entry_points={
+1 -6
View File
@@ -586,12 +586,7 @@ def _page_get_textblocks(infile, pageno):
"Smarter text detection"
doc = fitz.Document(infile)
if fitz.version[0] >= '1.13.0':
text = doc[pageno].getText('dict')
else:
import json
textjson = doc[pageno].getText('json')
text = json.loads(textjson)
text = doc[pageno].getText('dict')
if not text:
return