[
https://issues.apache.org/jira/browse/TIKA-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17304102#comment-17304102
]
Nick Burch commented on TIKA-3328:
----------------------------------
We give a file starting %PDF a high magic priority, but one starting a bit
further in a lower one due to false positive risks:
[https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml#L681]
Matlab we have a range of priorities, including a low-ish one for things that
look like comments, which is what is triggering here:
[https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml#L7131]
I'm tempted to add another PDF match, for %% at the start and then %PDF- a bit
later, with 40 priority (since there's a slight chance of a false positive but
much lower), does that seem reasonable to everyone?
> PDFs detected as matlab
> -----------------------
>
> Key: TIKA-3328
> URL: https://issues.apache.org/jira/browse/TIKA-3328
> Project: Tika
> Issue Type: Task
> Reporter: Tim Allison
> Priority: Trivial
> Attachments: GHOSTSCRIPT-690494-1.pdf, pdf.js-LINK-1691-0.pdf
>
>
> In two rare cases in one corpus, I noticed that two PDFs, both starting with
> '%%' are identified as matlab because our matlab patterns look for '%%'.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)