tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TIKA-389) Garbled metadata when dealing with encrypted PDF files.
Date Wed, 01 Dec 2010 23:24:13 GMT

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

paul commented on TIKA-389:
---------------------------

Read Martijn Brinkers' comment from PDFBOX-858, it seems like changing the following condition
inside the method org.apache.tika.parser.pdf.PDFParser.parse() works for me.

change if (pdfDocument.isEncrypted() && !pdfDocument.getCurrentAccessPermission().canExtractContent())
==> to if (pdfDocument.isEncrypted()).

Can any committer verify it and commit to the trunk?

Thanks!


> Garbled metadata when dealing with encrypted PDF files.
> -------------------------------------------------------
>
>                 Key: TIKA-389
>                 URL: https://issues.apache.org/jira/browse/TIKA-389
>             Project: Tika
>          Issue Type: Bug
>          Components: metadata, parser
>    Affects Versions: 0.6
>         Environment: Windows 7 64-bit
>            Reporter: Gabriel Miklos
>            Priority: Minor
>
> The code exhibiting this issue is very simple:
>         InputStream input = new FileInputStream(file);
>         ContentHandler textHandler = new BodyContentHandler();
>         tikaParser.parse(input, textHandler, metadata);
>         input.close();
>         System.out.println(metadata);
> The output:
> title=?a???▬÷&▼??♂?ŢjK???ž?↑M?A→<═]1
> =╬\bK Author=═g?═?♦ Content-Type=application/pdf creator=?k?═?♦Ý`;Ý?)??/¶???Ě?3n
> Î☼46ËO
> Other than that, the extracted text is 100% correct.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message