• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Base MIME types file for CUPS.
3#
4# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
5# VERSIONS OF CUPS.  Instead, create a "local.types" file that
6# reflects your local configuration changes.
7#
8# Copyright © 2020-2024 by OpenPrinting.
9# Copyright © 2007-2017 by Apple Inc.
10# Copyright © 1997-2007 by Easy Software Products.
11#
12# Licensed under Apache License v2.0.  See the file "LICENSE" for more
13# information.
14#
15
16########################################################################
17#
18# Format of Lines:
19#
20#   super/type rules
21#
22# "rules" can be any combination of:
23#
24#   ( expr )				Parenthesis for expression grouping
25#   +					Logical AND
26#   , or whitespace			Logical OR
27#   !					Logical NOT
28#   match("pattern")			Pattern match on filename
29#   extension				Pattern match on "*.extension"
30#   ascii(offset,length)		True if bytes are valid printable ASCII
31#					(CR, NL, TAB, BS, 32-126)
32#   priority(number)                    Sets priority of type (0=lowest,
33#                                       100=default, 200=highest)
34#   printable(offset,length)		True if bytes are printable 8-bit chars
35#					(CR, NL, TAB, BS, 32-126, 128-254)
36#   regex(offset,"regex")		True if bytes match regular expression
37#   string(offset,"string")		True if bytes are identical to string
38#   istring(offset,"string")		True if bytes are identical to
39#                                       case-insensitive string
40#   char(offset,value)			True if byte is identical
41#   short(offset,value)			True if 16-bit integer is identical
42#   int(offset,value)			True if 32-bit integer is identical
43#   locale("string")                    True if current locale matches string
44#   contains(offset,range,"string")	True if the range contains the string
45#
46# General Notes:
47#
48#   MIME type names are case-insensitive.  Internally they are converted
49#   to lowercase.  Multiple occurrences of a type will cause the provided
50#   rules to be appended to the existing definition.  If two types use the same
51#   rules to resolve a type and have the same priority, e.g. "doc" extension for
52#   "text/bar" and "text/foo", the returned type will be the first type as
53#   sorted in alphanumerically ascending order without regard to case.  Thus,
54#   the "text/bar" type will match the "doc" extension first unless the
55#   "text/foo" type has specified a higher priority.
56#
57#   The "printable" rule differs from the "ascii" rule in that it also
58#   accepts 8-bit characters in the range 128-255.
59#
60#   String constants must be surrounded by "" if they contain whitespace.
61#   To insert binary data into a string, use the <hex> notation.
62#
63
64########################################################################
65#
66# Application-generated files...
67#
68
69#application/msword		doc string(0,<D0CF11E0A1B11AE1>)
70application/pdf			pdf regex(0,^[\n\r]*%PDF)
71application/postscript		ai eps ps string(0,%!) string(0,<04>%!) \
72				contains(0,128,<1B>%-12345X) + \
73				(contains(0,8192,"LANGUAGE=POSTSCRIPT") \
74				 contains(0,8192,"LANGUAGE = Postscript") \
75				 contains(0,8192,"LANGUAGE = PostScript") \
76				 contains(0,8192,"LANGUAGE = POSTSCRIPT") \
77				 (contains(0,8192,<0a>%!) + \
78				  !contains(0,8192,"ENTER LANGUAGE")))
79
80
81########################################################################
82#
83# Image files...
84#
85
86image/gif			gif string(0,GIF87a) string(0,GIF89a)
87image/png			png string(0,<89>PNG)
88image/jpeg			jpeg jpg jpe string(0,<FFD8FF>) +\
89				(char(3,0xe0) char(3,0xe1) char(3,0xe2) char(3,0xe3)\
90				 char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
91				 char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
92				 char(3,0xec) char(3,0xed) char(3,0xee) char(3,0xef))
93image/pwg-raster		string(0,"RaS2") + string(4,PwgRaster<00>) priority(150)
94image/tiff			tiff tif string(0,MM<002A>) string(0,II<2A00>)
95image/x-photocd			pcd string(2048,PCD_IPI)
96image/x-portable-anymap		pnm
97image/x-portable-bitmap		pbm string(0,P1) string(0,P4)
98image/x-portable-graymap	pgm string(0,P2) string(0,P5)
99image/x-portable-pixmap		ppm string(0,P3) string(0,P6)
100image/x-sgi-rgb			rgb sgi bw icon short(0,474)
101image/x-xbitmap			xbm
102image/x-xpixmap			xpm ascii(0,1024) + string(3,"XPM")
103#image/x-xwindowdump		xwd string(4,<00000007>)
104image/x-sun-raster		ras string(0,<59a66a95>)
105
106#image/fpx			fpx
107image/urf			urf string(0,UNIRAST<00>)
108image/x-alias			pix short(8,8) short(8,24)
109image/x-bitmap			bmp string(0,BM) + !printable(2,14)
110image/x-icon			ico
111
112########################################################################
113#
114# Text files...
115#
116
117application/x-cshell		csh printable(0,1024) + string(0,#!) +\
118				(contains(2,80,/csh) contains(2,80,/tcsh))
119application/x-perl		pl printable(0,1024) + string(0,#!) +\
120				contains(2,80,/perl)
121application/x-shell		sh printable(0,1024) + string(0,#!) +\
122				(contains(2,80,/bash) contains(2,80,/ksh)\
123				 contains(2,80,/sh) contains(2,80,/zsh))
124application/x-csource		c cxx cpp cc C h hpp \
125				printable(0,1024) + ! css + \
126				(string(0,/*) string(0,//) \
127				 string(0,#include) contains(0,1024,<0a>#include) \
128				 string(0,#define) contains(0,1024,<0a>#define))
129text/html			html htm printable(0,1024) +\
130				(istring(0,"<HTML>") istring(0,"<!DOCTYPE"))
131text/plain			txt printable(0,1024)
132text/css			css
133
134
135########################################################################
136#
137# RSS feed type...
138#
139
140application/rss+xml		rss
141
142
143########################################################################
144#
145# CUPS-specific types...
146#
147
148application/vnd.cups-banner	string(0,'#CUPS-BANNER')
149application/vnd.cups-command	string(0,'#CUPS-COMMAND')
150application/vnd.cups-pdf
151application/vnd.cups-postscript
152application/vnd.cups-ppd	ppd string(0,"*PPD-Adobe:")
153application/vnd.cups-raster	string(0,"RaSt") string(0,"tSaR") \
154				(string(0,"RaS2") + !string(4,PwgRaster<00>)) string(0,"2SaR") \
155				string(0,"RaS3") string(0,"3SaR")
156application/vnd.cups-raw	(string(0,<1B>E) + !string(2,<1B>%0B)) \
157				string(0,<1B>@) \
158				(contains(0,128,<1B>%-12345X) + \
159				 (contains(0,8192,"LANGUAGE=PCL") \
160				  contains(0,8192,"LANGUAGE = PCL")))
161
162########################################################################
163#
164# Raw print file support...
165#
166# Comment the following type to prevent raw file printing.
167#
168
169application/octet-stream
170