vendor/file: upgrade from 5.39 to 5.40
[dragonfly.git] / contrib / file / magic / Magdir / pdf
1
2 #------------------------------------------------------------------------------
3 # $File: pdf,v 1.15 2020/08/23 00:30:45 christos Exp $
4 # pdf:  file(1) magic for Portable Document Format
5 #
6
7 0       name    pdf
8 >8      search          /Count
9 >>&0    regex           [0-9]+          \b, %s pages
10 >8      search/512      /Filter/FlateDecode/    (password protected)
11
12 0       string          %PDF-           PDF document
13 !:mime  application/pdf
14 !:strength +60
15 !:ext   pdf
16 >5      byte            x               \b, version %c
17 >7      byte            x               \b.%c
18 >0      use             pdf
19
20 0       string          \012%PDF-       PDF document
21 !:mime  application/pdf
22 !:strength +60
23 !:ext   pdf
24 >6      byte            x               \b, version %c
25 >8      byte            x               \b.%c
26 >0      use             pdf
27
28 0       string          \xef\xbb\xbf%PDF-       PDF document (UTF-8)
29 !:mime  application/pdf
30 !:strength +60
31 !:ext   pdf
32 >6      byte            x               \b, version %c
33 >8      byte            x               \b.%c
34 >0      use             pdf
35
36 # From: Nick Schmalenberger <nick@schmalenberger.us>
37 # Forms Data Format
38 0       string          %FDF-           FDF document
39 !:mime application/vnd.fdf
40 !:strength +60
41 !:ext   pdf
42 >5      byte            x               \b, version %c
43 >7      byte            x               \b.%c
44
45 0       search/256      %PDF-           PDF document
46 !:mime  application/pdf
47 !:strength +60
48 !:ext   pdf
49 >&0     byte            x               \b, version %c
50 >&2     byte            x               \b.%c
51 >0      use             pdf