Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

MIME Types and CUPS Filters

CUPS reads the file /etc/cups/mime.types (and all other files carrying a *.types suffix in the same directory) upon startup. These files contain the MIME type recognition rules that are applied when CUPS runs its autotyping routines. The rule syntax is explained in the man page for mime.types and in the comments section of the mime.types file itself. A simple rule reads like this:

application/pdf         pdf string(0,%PDF)

This means if a filename has a .pdf suffix or if the magic string %PDF is right at the beginning of the file itself (offset 0 from the start), then it is a PDF file ( application/pdf ). Another rule is this:

application/postscript  ai eps ps string(0,%!) string(0,<04>%!)

If the filename has one of the suffixes .ai, .eps, .ps, or if the file itself starts with one of the strings %! or <04>%! , it is a generic PostScript file ( application/postscript ).

Samba HowTo Guide
Prev Home Next

 
 
  Published under the terms fo the GNU General Public License Design by Interspire