5

What is the complete list of file formats that CUPS supports? (i. e. what file types can I feed to lpr directly without having to convert them first?)

I have been searching for the answer and haven't found anything specific. The best I've been able to find is "CUPS understands many different types of files directly, including text, PostScript, PDF, and image files." But this is still fairly vague; in particular, what image file formats does it accept?

Thanks!

1
  • That depends on what filters are installed. (And no, I don't know how to find that out, but digging around cupsfilter should help.) Jun 22, 2017 at 23:12

1 Answer 1

3

CUPS uses a MIME database to determine which file conversions it can can perform.

The database is composed of *.convs and *.types files. Both of these have man pages:

The cupsd man page lists the locations of these files as:

  • /usr/share/cups/mime/mime.convs
  • /usr/share/cups/mime/mime.types

There are typically additional *.convs and *.types files in /usr/share/cups/mime/, and cupsd uses these as well.

On my Slackware 14.2 system, I get the following:

$ grep -h "^[^#]" /usr/share/cups/mime/*.convs | sort
application/msword  text/vnd.cups-brf   30  texttobrf
application/octet-stream    application/vnd.cups-raw    0   -
application/pdf     application/vnd.cups-pdf        66  pdftopdf
application/pdf     text/vnd.cups-brf   100 texttobrf
application/pdf image/tiff      80       pstotiff
application/postscript      application/vnd.cups-postscript 66  pstops
application/postscript  application/pdf             0   pstopdf
application/postscript  image/tiff      80       pstotiff
application/rtf     text/vnd.cups-brf   30  texttobrf
application/vnd.adobe-reader-postscript application/vnd.cups-postscript 66  pstops
application/vnd.cups-pdf    application/vnd.cups-postscript 100 pdftops
application/vnd.cups-pdf    application/vnd.cups-raster 100 pdftoraster
application/vnd.cups-pdf    application/vnd.cups-raster 99  gstoraster
application/vnd.cups-pdf image/tiff 80 pstotiff
application/vnd.cups-pdf-banner application/pdf         32  bannertopdf
application/vnd.cups-postscript application/vnd.cups-raster 175 gstoraster
application/vnd.cups-postscript image/tiff 80 pstotiff
application/vnd.cups-raster image/pwg-raster        100 rastertopwg
application/vnd.openxmlformats-officedocument.wordprocessingml.document text/vnd.cups-brf   30  texttobrf
application/x-cshell        text/plain          100 -
application/x-cshell    application/pdf             32  texttopdf
application/x-csource       text/plain          100 -
application/x-csource   application/pdf             32  texttopdf
application/x-perl      text/plain          100 -
application/x-perl  application/pdf             32  texttopdf
application/x-shell     text/plain          100 -
application/x-shell application/pdf             32  texttopdf
application/xhtml   text/vnd.cups-brf   10  texttobrf
application/xml     text/vnd.cups-brf   10  texttobrf
image/gif           application/vnd.cups-raster 100 imagetoraster
image/gif       application/vnd.cups-pdf        65  imagetopdf
image/gif       image/vnd.cups-brf  70  imagetobrf
image/gif       image/vnd.cups-ubrl 70  imagetoubrl
image/jpeg          application/vnd.cups-raster 100 imagetoraster
image/jpeg      application/vnd.cups-pdf        65  imagetopdf
image/jpeg      image/vnd.cups-brf  70  imagetobrf
image/jpeg      image/vnd.cups-ubrl 70  imagetoubrl
image/pcx       image/vnd.cups-brf  70  imagetobrf
image/pcx       image/vnd.cups-ubrl 70  imagetoubrl
image/png           application/vnd.cups-raster 100 imagetoraster
image/png       application/vnd.cups-pdf        65  imagetopdf
image/png       image/vnd.cups-brf  70  imagetobrf
image/png       image/vnd.cups-ubrl 70  imagetoubrl
image/pwg-raster    application/pdf             32  rastertopdf
image/svg       image/vnd.cups-brf  70  imagetobrf
image/svg       image/vnd.cups-ubrl 70  imagetoubrl
image/tiff          application/vnd.cups-raster 100 imagetoraster
image/tiff      application/vnd.cups-pdf        65  imagetopdf
image/tiff      image/vnd.cups-brf  70  imagetobrf
image/tiff      image/vnd.cups-ubrl 70  imagetoubrl
image/urf       application/pdf             0   urftopdf
image/vnd.microsoft.icon    image/vnd.cups-brf  70  imagetobrf
image/vnd.microsoft.icon    image/vnd.cups-ubrl 70  imagetoubrl
image/x-bitmap          application/vnd.cups-raster 100 imagetoraster
image/x-bitmap      application/vnd.cups-pdf        65  imagetopdf
image/x-ms-bmp      image/vnd.cups-brf  70  imagetobrf
image/x-ms-bmp      image/vnd.cups-ubrl 70  imagetoubrl
image/x-photocd         application/vnd.cups-raster 100 imagetoraster
image/x-photocd     application/vnd.cups-pdf        65  imagetopdf
image/x-portable-anymap     application/vnd.cups-raster 100 imagetoraster
image/x-portable-anymap application/vnd.cups-pdf        65  imagetopdf
image/x-portable-anymap image/vnd.cups-brf  70  imagetobrf
image/x-portable-anymap image/vnd.cups-ubrl 70  imagetoubrl
image/x-portable-bitmap     application/vnd.cups-raster 100 imagetoraster
image/x-portable-bitmap application/vnd.cups-pdf        65  imagetopdf
image/x-portable-bitmap image/vnd.cups-brf  70  imagetobrf
image/x-portable-bitmap image/vnd.cups-ubrl 70  imagetoubrl
image/x-portable-graymap    application/vnd.cups-raster 100 imagetoraster
image/x-portable-graymap    image/vnd.cups-brf  70  imagetobrf
image/x-portable-graymap    image/vnd.cups-ubrl 70  imagetoubrl
image/x-portable-graymap application/vnd.cups-pdf       65  imagetopdf
image/x-portable-pixmap     application/vnd.cups-raster 100 imagetoraster
image/x-portable-pixmap application/vnd.cups-pdf        65  imagetopdf
image/x-portable-pixmap image/vnd.cups-brf  70  imagetobrf
image/x-portable-pixmap image/vnd.cups-ubrl 70  imagetoubrl
image/x-sgi-rgb         application/vnd.cups-raster 100 imagetoraster
image/x-sgi-rgb     application/vnd.cups-pdf        65  imagetopdf
image/x-sun-raster      application/vnd.cups-raster 100 imagetoraster
image/x-sun-raster  application/vnd.cups-pdf        65  imagetopdf
image/x-xbitmap         application/vnd.cups-raster 100 imagetoraster
image/x-xbitmap     application/vnd.cups-pdf        65  imagetopdf
image/x-xbitmap     image/vnd.cups-brf  70  imagetobrf
image/x-xbitmap     image/vnd.cups-ubrl 70  imagetoubrl
image/x-xpixmap         application/vnd.cups-raster 100 imagetoraster
image/x-xpixmap     application/vnd.cups-pdf        65  imagetopdf
image/x-xpixmap     image/vnd.cups-brf  70  imagetobrf
image/x-xpixmap     image/vnd.cups-ubrl 70  imagetoubrl
image/x-xwindowdump application/vnd.cups-pdf        65  imagetopdf
image/x-xwindowdump image/vnd.cups-brf  70  imagetobrf
image/x-xwindowdump image/vnd.cups-ubrl 70  imagetoubrl
text/css            text/plain          100 -
text/html           text/plain          100 -
text/html       application/pdf             32  texttopdf
text/html       text/vnd.cups-brf   10  texttobrf
text/plain      application/pdf             32  texttopdf
text/plain      text/vnd.cups-brf   0   texttobrf
text/rtf        text/vnd.cups-brf   30  texttobrf

You can also see which filters will be used by a conversion by calling cupsfilter directly with a file and the --list-filters option (which will not print the file):

$ cupsfilter --list-filters foo.png
imagetoraster
rastertopwg
rastertopdf

(Note: I have a default printer set via lpoptions, so I didn't have to supply the printer name. If you do have to, you can pass the printer name to cupsfilter with the -d option.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .