Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.19.1
-
None
-
MacBook Pro and Windows Server 2012
This code works on the enclosed pdf file on a MacBook, but not using windows server?
-
Patch, Important
Description
try:
headers = {'X-Tika-PDFextractInlineImages': 'true',} #
data = parser.from_file(pathtofile, serverEndpoint=self.TIKA_SERVER, headers=headers)
charstoreturn = data['content'].strip().split()[:limit]
charstoreturn = ' '.join(charstoreturn).replace("\n", " ").replace('"', "'").replace(",","").replace("'","'")
return True, charstoreturn
except Exception as err:
return False, "error {} on file: {}.\n".format(str(err), pathtofile)