xref: /freebsd/contrib/file/magic/Magdir/pdf (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*43a5ec4eSXin LI# $File: pdf,v 1.16 2021/07/30 11:47:07 christos Exp $
4b6cee71dSXin LI# pdf:  file(1) magic for Portable Document Format
5b6cee71dSXin LI#
6b6cee71dSXin LI
72726a701SXin LI0	name	pdf
8*43a5ec4eSXin LI>8	search		/Count
9*43a5ec4eSXin LI>>&0	regex		[0-9]+		\b, %s pages
10*43a5ec4eSXin LI>8	search/512	/Filter/FlateDecode/	(zip deflate encoded)
112726a701SXin LI
12b6cee71dSXin LI0	string		%PDF-		PDF document
13b6cee71dSXin LI!:mime	application/pdf
142dc4dbb9SEitan Adler!:strength +60
15*43a5ec4eSXin LI!:ext	pdf
16b6cee71dSXin LI>5	byte		x		\b, version %c
17b6cee71dSXin LI>7	byte		x		\b.%c
182726a701SXin LI>0	use		pdf
19b6cee71dSXin LI
205f0216bdSXin LI0	string		\012%PDF-	PDF document
215f0216bdSXin LI!:mime	application/pdf
222dc4dbb9SEitan Adler!:strength +60
23*43a5ec4eSXin LI!:ext	pdf
245f0216bdSXin LI>6	byte		x		\b, version %c
255f0216bdSXin LI>8	byte		x		\b.%c
262726a701SXin LI>0	use		pdf
275f0216bdSXin LI
28d38c30c0SXin LI0	string		\xef\xbb\xbf%PDF-	PDF document (UTF-8)
29d38c30c0SXin LI!:mime	application/pdf
30d38c30c0SXin LI!:strength +60
31*43a5ec4eSXin LI!:ext	pdf
32d38c30c0SXin LI>6	byte		x		\b, version %c
33d38c30c0SXin LI>8	byte		x		\b.%c
342726a701SXin LI>0	use		pdf
35d38c30c0SXin LI
36b6cee71dSXin LI# From: Nick Schmalenberger <nick@schmalenberger.us>
37b6cee71dSXin LI# Forms Data Format
38b6cee71dSXin LI0       string          %FDF-           FDF document
39b6cee71dSXin LI!:mime application/vnd.fdf
402dc4dbb9SEitan Adler!:strength +60
41*43a5ec4eSXin LI!:ext	pdf
42b6cee71dSXin LI>5      byte            x               \b, version %c
43b6cee71dSXin LI>7      byte            x               \b.%c
4440427ccaSGordon Tetlow
4540427ccaSGordon Tetlow0	search/256	%PDF-		PDF document
4640427ccaSGordon Tetlow!:mime	application/pdf
472dc4dbb9SEitan Adler!:strength +60
48*43a5ec4eSXin LI!:ext	pdf
4940427ccaSGordon Tetlow>&0	byte		x		\b, version %c
5040427ccaSGordon Tetlow>&2	byte		x		\b.%c
512726a701SXin LI>0	use		pdf
52