summaryrefslogtreecommitdiffstats
path: root/magic/Magdir/pdf
blob: 38de3cff9b9f49590221246749a5dbc9be4215ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#------------------------------------------------------------------------------
# $File: pdf,v 1.16 2021/07/30 11:47:07 christos Exp $
# pdf:  file(1) magic for Portable Document Format
#

0	name	pdf
>8	search		/Count
>>&0	regex		[0-9]+		\b, %s pages
>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

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

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

# From: Nick Schmalenberger <nick@schmalenberger.us>
# Forms Data Format
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
!:mime	application/pdf
!:strength +60
!:ext	pdf
>&0	byte		x		\b, version %c
>&2	byte		x		\b.%c
>0	use		pdf