[jira] [Commented] (TIKA-2794) Tika extracts text from pdf on MacBook, but not windows server.,

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (TIKA-2794) Tika extracts text from pdf on MacBook, but not windows server.,

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/TIKA-2794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16710767#comment-16710767 ]

Ken Krugler commented on TIKA-2794:
-----------------------------------

Hi [~phallett] - it's better if you first post something like this as a question to the [user mailing list|https://tika.apache.org/mail-lists.html], and then if the Tika community thinks it's a bug, you can file a Jira issue.

Thanks!

-- Ken

> 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
>
>         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
(v7.6.3#76005)