aboutsummaryrefslogtreecommitdiff
path: root/contrib/file/magic/Magdir/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file/magic/Magdir/pdf')
-rw-r--r--contrib/file/magic/Magdir/pdf13
1 files changed, 10 insertions, 3 deletions
diff --git a/contrib/file/magic/Magdir/pdf b/contrib/file/magic/Magdir/pdf
index e386f454a593..7a99d8d3cf3d 100644
--- a/contrib/file/magic/Magdir/pdf
+++ b/contrib/file/magic/Magdir/pdf
@@ -1,15 +1,18 @@
#------------------------------------------------------------------------------
-# $File: pdf,v 1.12 2020/01/30 01:48:44 christos Exp $
+# $File: pdf,v 1.18 2023/07/17 15:57:18 christos Exp $
# pdf: file(1) magic for Portable Document Format
#
0 name pdf
->8 search/512 /Filter/FlateDecode/ (password protected)
+>8 search /Count
+>>&0 regex [0-9]+ \b, %s page(s)
+>8 search/512 /Filter/FlateDecode/ (zip deflate encoded)
0 string %PDF- PDF document
!:mime application/pdf
!:strength +60
+!:ext pdf
>5 byte x \b, version %c
>7 byte x \b.%c
>0 use pdf
@@ -17,6 +20,7 @@
0 string \012%PDF- PDF document
!:mime application/pdf
!:strength +60
+!:ext pdf
>6 byte x \b, version %c
>8 byte x \b.%c
>0 use pdf
@@ -24,6 +28,7 @@
0 string \xef\xbb\xbf%PDF- PDF document (UTF-8)
!:mime application/pdf
!:strength +60
+!:ext pdf
>6 byte x \b, version %c
>8 byte x \b.%c
>0 use pdf
@@ -33,12 +38,14 @@
0 string %FDF- FDF document
!:mime application/vnd.fdf
!:strength +60
+!:ext pdf
>5 byte x \b, version %c
>7 byte x \b.%c
-0 search/256 %PDF- PDF document
+0 search/1024 %PDF- PDF document
!:mime application/pdf
!:strength +60
+!:ext pdf
>&0 byte x \b, version %c
>&2 byte x \b.%c
>0 use pdf