CUPS 支持哪些文件格式?

CUPS 支持哪些文件格式?

CUPS 支持的文件格式的完整列表是什么? (即我可以直接提供哪些文件类型lpr而无需先转换它们?)

我一直在寻找答案,但没有找到任何具体的东西。我能找到的最好的是“CUPS 直接识别许多不同类型的文件,包括文本、PostScript、PDF 和图像文件。“但这仍然相当模糊;特别是它接受哪些图像文件格式?

谢谢!

答案1

CUPS 使用MIME数据库以确定它可以执行哪些文件转换。

数据库由*.convs*.types文件组成。这两个都有手册页:

cupsd 手册页将这些文件的位置列出为:

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

中通常还有额外的 *.convs 和 *.types 文件/usr/share/cups/mime/,cupsd 也使用这些文件。

在我的 Slackware 14.2 系统上,我得到以下信息:

$ 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

cupsfilter您还可以通过直接调用文件和选项--list-filters(不会打印文件)来查看转换将使用哪些过滤器:

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

(注意:我通过 设置了默认打印机lpoptions,因此我不必提供打印机名称。如果必须提供,您可以使用该cupsfilter选项将打印机名称传递给-d。)

相关内容