mime.convs(5)

πŸ“¦
version 2.4.19 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– mime.convs(5) πŸ’–

okay bestie, gather round, because we're talking about mime.convs β€” that's the mime type conversion file for cups, and yes, it's deprecated, we'll get to that, don't panic 🫢


✨ NAME ✨

mime.convs β€” mime type conversion file for cups (deprecated) πŸ’€


🌸 DESCRIPTION 🌸

so the mime.convs file is literally the master list of which filters are available for converting files from one format to another. the standard filters hold it down for text, PDF, PostScript, and a whole bunch of image file types. iconic range, honestly πŸ‘‘

you can add extra filters in files that have the .convs extension, and they live in the CUPS configuration directory. yes, plural, you can have several. slay.

every single line in the mime.convs file is one of exactly three things: a comment, a blank, or a filter line. that's it, that's the whole vibe check.

  • comment lines start with the # character. classic.
  • filter lines spell out the source and destination MIME types, plus a relative cost for the filter, plus the filter to actually run:
source/type destination/type cost filter

let's break that down, bestie, one field at a time πŸ’…

  • the source/type field is the source MIME media type that gets consumed by the filter. it's the thing going in.
  • the destination/type field is the destination MIME media type that gets produced by the filter. it's the thing coming out.
  • the cost field is the relative cost of running the filter. a value of 100 means the filter uses a large amount of resources, while a value of 0 means the filter uses very few resources. low cost = lowkey chill, high cost = highkey hungry πŸ“
  • the filter field is the filter program filename. and here's the tea: filenames are relative to the CUPS filter directory. no absolute paths, she's relative, periodt.

πŸŽ€ FILES πŸŽ€

  • /etc/cups β€” typical CUPS configuration directory.
  • /usr/lib/cups/filter β€” typical CUPS filter directory.
  • /usr/libexec/cups/filter β€” CUPS filter directory on macOS.

πŸ¦‹ EXAMPLES πŸ¦‹

say you wanna define a filter that converts PostScript documents to CUPS Raster format. here's exactly how that looks:

application/vnd.cups-postscript application/vnd.cups-raster 50 pstoraster

see? source type, destination type, cost of 50, and the filter. chef's kiss 😭


⭐ NOTES ⭐

CUPS filters are deprecated and will no longer be supported in a future feature release of CUPS. fr fr, this is the part where you pay attention.

printers that don't support IPP can still be supported using applications such as ippeveprinter(1). so there's a path forward, bestie, don't spiral πŸ’œ


🌈 SEE ALSO 🌈

cups-files.conf(5), cupsd.conf(5), cupsd(8), cupsfilter(8), mime.types(5), CUPS Online Help (http://localhost:631/help)


Copyright Β© 2020-2024 by OpenPrinting.


and that's the whole page, no cap ✨ this was the mime.convs(5) manual, dated 2021-02-28, brought to you by CUPS and OpenPrinting β€” thanks for reading, ily, go convert something πŸ§šπŸ’–

πŸ“¦ where this page comes from