[ 
https://issues.apache.org/jira/browse/TIKA-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Allison updated TIKA-2794:
------------------------------
    Fix Version/s:     (was: 2.0.0)
                   2.0.0-BETA

> Tika extracts text from pdf on MacBook, but not windows server.,
> ----------------------------------------------------------------
>
>                 Key: TIKA-2794
>                 URL: https://issues.apache.org/jira/browse/TIKA-2794
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.19.1
>         Environment: MacBook Pro and Windows Server 2012
> This code works on the enclosed pdf file on a MacBook, but not using windows 
> server?
>            Reporter: Paul Hallett
>            Priority: Major
>             Fix For: 2.0.0-BETA
>
>         Attachments: test2.pdf
>
>
> 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)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to