You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2021/03/31 14:13:50 UTC
[tika] branch main updated: TIKA-3328 -- make PDF detection a bit
more flexible
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 3381c73 TIKA-3328 -- make PDF detection a bit more flexible
new 99a4afb Merge remote-tracking branch 'origin/main' into main
3381c73 is described below
commit 3381c7328875073300fb6fc6b0be850562977d60
Author: tallison <ta...@apache.org>
AuthorDate: Wed Mar 31 10:13:22 2021 -0400
TIKA-3328 -- make PDF detection a bit more flexible
---
.../main/resources/org/apache/tika/mime/tika-mimetypes.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
index d44987e..ef0ea14 100644
--- a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
+++ b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
@@ -683,6 +683,17 @@
<!-- Sometimes has a UTF-8 Byte Order Mark first -->
<match value="\xef\xbb\xbf%PDF-" type="string" offset="0"/>
</magic>
+ <magic priority="40">
+ <!-- Higher priority than matlab's priority=20 %% match
+ Low priority match for %PDF-#.# near the start of the file -->
+ <!-- Can trigger false positives, so set the priority rather low here -->
+ <match value="%%" type="string" offset="0:128">
+ <match value="%PDF-1." type="string" offset="1:512"/>
+ </match>
+ <match value="%%" type="string" offset="0:128">
+ <match value="%PDF-2." type="string" offset="1:512"/>
+ </match>
+ </magic>
<magic priority="20">
<!-- Low priority match for %PDF-#.# near the start of the file -->
<!-- Can trigger false positives, so set the priority rather low here -->