pdf: ocr function was broken for python3 in some cases (depending on how the ocr language was specified)
This commit is contained in:
parent
4c205e44e0
commit
9dcdb6e9a6
@ -243,7 +243,7 @@ class PDFExtractor:
|
|||||||
tesseractlang = os.environ.get("RECOLL_TESSERACT_LANG", "");
|
tesseractlang = os.environ.get("RECOLL_TESSERACT_LANG", "");
|
||||||
if tesseractlang:
|
if tesseractlang:
|
||||||
return tesseractlang
|
return tesseractlang
|
||||||
pdflangfile = os.path.join(self.confdir, b"ocrpdf")
|
pdflangfile = os.path.join(self.confdir, "ocrpdf")
|
||||||
if os.path.isfile(pdflangfile):
|
if os.path.isfile(pdflangfile):
|
||||||
tesseractlang = open(pdflangfile, "r").read().strip()
|
tesseractlang = open(pdflangfile, "r").read().strip()
|
||||||
if tesseractlang:
|
if tesseractlang:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user