Que formatos de arquivo o CUPS suporta?

4

Qual é a lista completa de formatos de arquivo que o CUPS suporta? (i. e. quais tipos de arquivo eu posso alimentar para lpr diretamente sem ter que convertê-los primeiro?)

Eu tenho procurado a resposta e não encontrei nada específico. O melhor que consegui encontrar é " O CUPS entende muitos tipos diferentes de arquivos diretamente, incluindo texto, PostScript, PDF e arquivos de imagem. "Mas isso ainda é bastante vago; em particular, que formatos de arquivo de imagem ele aceita?

Obrigado!

    
por user31708 21.06.2017 / 04:12

1 resposta

1

O CUPS usa um banco de dados MIME para determinar quais conversões de arquivo ele pode realizar.

O banco de dados é composto de arquivos *.convs e *.types . Ambos têm páginas man:

A página man do cupsd lista os locais desses arquivos como:

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

Normalmente há arquivos * .convs e * .types adicionais em /usr/share/cups/mime/ , e o cupsd também usa esses arquivos.

No meu sistema Slackware 14.2, recebo o seguinte:

$ 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

Você também pode ver quais filtros serão usados por uma conversão chamando cupsfilter diretamente com um arquivo e a opção --list-filters (que não imprimirá o arquivo):

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

(Nota: Eu tenho uma impressora padrão definida via lpoptions , então eu não tenho que fornecer o nome da impressora. Se você precisar, você pode passar o nome da impressora para cupsfilter com o -d opção.)

    
por 03.06.2018 / 20:13

Tags