cupsfilter(8)

πŸ“¦
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

πŸ’… cupsfilter(8) β€” the OpenPrinting glow-up πŸ’…

okay bestie, so this is a page from the OpenPrinting manual, section 8 (that's the "system admin / daemon" girlies), and it's all about cupsfilter. heads up though: she's deprecated πŸ™ˆ keep reading, it's giving legacy icon energy.


✨ NAME ✨

cupsfilter β€” convert a file to another format using cups filters (deprecated)

ngl the "(deprecated)" in the name is doing a lot of emotional labor here. she still works, she's just on her farewell tour πŸŽ€

🌸 SYNOPSIS 🌸

cupsfilter [ --list-filters ] [ -D ] [ -U user ] [ -c config-file ] [ -d
printer ] [ -e ] [ -i mime/type ] [ -j job-id[,N] ] [ -m mime/type ] [
-n copies ] [ -o name=value ] [ -p filename.ppd ] [ -t title ] [ -u ]
filename

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically cupsfilter is a front-end to the CUPS filter subsystem, and she lets you convert a file to a specific format, exactly like you'd printed it through CUPS. same pipeline, same drama, no printer required.

by default, cupsfilter generates a PDF file. and the converted file gets sent straight to standard output β€” so redirect it or it's just gonna vibe onto your terminal, bestie. 😭


πŸ’– OPTIONS πŸ’–

  • --list-filters β€” don't actually run the filters, just print the filters used to stdout. it's a vibe check, not a conversion. πŸ”
  • -D β€” delete the input file after conversion. bye bye original, hope you meant that πŸ’€
  • -U user β€” specifies the username passed to the filters. the default is the name of the current user.
  • -c config-file β€” uses the named cups-files.conf configuration file. custom config, main character move.
  • -d printer β€” uses information from the named printer.
  • -e β€” use every filter from the PPD file. all of them. no filter left behind ✨
  • -i mime/type β€” specifies the source file type. the default file type is guessed using the filename and contents of the file. she's intuitive like that.
  • -j job-id[,N] β€” converts document N from the specified job. if N is omitted, document 1 is converted. one-based, periodt.
  • -m mime/type β€” specifies the destination file type. the default file type is application/pdf. use printer/foo to convert to the printer format defined by the filters in the PPD file.
  • -n copies β€” specifies the number of copies to generate.
  • -o name=value β€” specifies options to pass to the CUPS filters.
  • -p filename.ppd β€” specifies the PPD file to use.
  • -t title β€” specifies the document title.
  • -u β€” delete the PPD file after conversion.

🫢 EXIT STATUS 🫢

cupsfilter returns a non-zero exit status on any error. so if the number ain't zero, something went sideways β€” check it, bestie 😀


🌈 ENVIRONMENT 🌈

all of the standard cups(1) environment variables affect the operation of cupsfilter. every single one of them. they're all in the group chat.


πŸŽ€ FILES πŸŽ€

  • /etc/cups/cups-files.conf
  • /etc/cups/*.convs
  • /etc/cups/*.types
  • /usr/share/cups/mime/*.convs
  • /usr/share/cups/mime/*.types

⭐ NOTES ⭐

🚨 okay this is the important part, don't scroll past it: CUPS printer drivers, filters, and backends are deprecated and will no longer be supported in a future feature release of CUPS. printers that don't support IPP can be supported using applications such as ippeveprinter(1).

and also β€” and this one's lowkey spicy β€” unlike when printing, filters run using the cupsfilter command use the current user and security session. this may result in different output or unexpected behavior. so it's not a 1:1 replica of the printing experience, no cap. πŸ™ˆ


πŸ”₯ EXAMPLE πŸ”₯

the following command will generate a PDF preview of job 42 for a printer named "myprinter" and save it to a file named "preview.pdf":

cupsfilter -m application/pdf -d myprinter -j 42 >preview.pdf

ate that. no crumbs. πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ


Copyright Β© 2020-2024 by OpenPrinting.


okay that's the whole page, bestie!! this was cupsfilter(8) from the CUPS manual, dated 2021-02-28 β€” love her, miss her, she's deprecated but she ATE. mwah πŸ’‹πŸ¦‹βœ¨

πŸ“¦ where this page comes from