Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
CUPS
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== MIME databases ==== After the CUPS system has assigned the print job to the scheduler, it is passed to the CUPS filter system. This converts the data to a format suitable for the printer. During start-up, the CUPS daemon loads two MIME databases: <code>mime.types</code> that defines the known file types that CUPS can accept data for, and <code>mime.convs</code> that defines the programs that process each particular MIME type.<ref name="MIMEadmin">{{cite web|work=[[Easy Software Products]]|publisher=CUPS Software Administrators Manual|url=http://www.cups.org/doc-1.1/sam.html#FILE_TYPING_FILTERING|title=File Typing and Filtering|access-date=January 9, 2007|url-status=dead|archive-url=https://web.archive.org/web/20070106145359/http://www.cups.org/doc-1.1/sam.html#FILE_TYPING_FILTERING|archive-date=January 6, 2007}}</ref> The <code>mime.types</code> file has the syntax: <code>mimetype { [file-extensions] | [pattern-match] }</code> For example, to detect an [[HTML]] file, the following entry would be applicable: <code>text/html html htm \</code><br/> :<code>printable(0,1024) + (string(0,"<nowiki><HTML></nowiki>") string(0,"<!DOCTYPE"))</code> The second line matches the file contents to the specified MIME type by determining that the first kilobyte of text in the file holds printable characters and that those characters include HTML markup. If the pattern above matches, then the filter system would mark the file as the MIME type text/html.<ref name="mime_types">{{cite web|work=[[Easy Software Products]]|publisher=CUPS Software Administrators Manual|url=http://www.cups.org/doc-1.1/sam.html#7_13_1|title=mime.types|access-date=January 9, 2007|url-status=dead|archive-url=https://web.archive.org/web/20070106145359/http://www.cups.org/doc-1.1/sam.html#7_13_1|archive-date=January 6, 2007}}</ref> The <code>mime.convs</code> file has the syntax: <code>source destination cost program</code> The ''source'' field designates the MIME type that is determined by looking up the <code>mime.types</code> file, while the ''destination'' field lists the type of output requested and determines what program should be used. This is also retrieved from <code>mime.types</code>. The ''cost'' field assists in the selection of sets of filters when converting a file. The last field, ''program'', determines which filter program to use to perform the data conversion.<ref name="mime_convs">{{cite web|work=[[Easy Software Products]]|publisher=CUPS Software Administrators Manual|url=http://www.cups.org/doc-1.1/sam.html#7_13_Γ©|title=mime.convs|access-date=January 9, 2007|url-status=dead|archive-url=https://web.archive.org/web/20070106145359/http://www.cups.org/doc-1.1/sam.html#7_13_Γ©|archive-date=January 6, 2007}}</ref> Some examples: text/plain application/postscript 50 texttops application/vnd.cups-postscript application/vnd.cups-raster 50 pstoraster image/* application/vnd.cups-postscript 50 imagetops image/* application/vnd.cups-raster 50 imagetoraster
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)