Convert a file to another format using cups filters.
Syntax 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 Options --list-filters Do not actually run the filters, just print the filters used to stdout. -D Delete the input file after conversion. -U user The username to pass to the filter(s). default = the current user. -c config-file Use the named cups-files.conf configuration file. -d printer Use information from the named printer. -e Use every filter from the PPD file. -i mime/type The source file type. The default file type is guessed using the filename and contents of the file. -j job-id[,N] Convert document N from the specified job. If N is omitted, document 1 is converted. -m mime/type 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 The number of copies to generate. -o name=value Options to pass to the CUPS filters. -p filename.ppd The PPD file to use. -t title The document title. -u Delete the PPD file after conversion.
cupsfilter is a front-end to the CUPS filter subsystem which allows you to convert a file to a specific format, just as if you had printed the file through CUPS. By default, cupsfilter generates a PDF file. The converted file is sent to the standard output.
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.
All of the standard cups(1) environment variables affect the operation of cupsfilter.
Read a text file and convert to a PDF:
cupsfilter foo.txt > foo.pdf
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
“We delight in the beauty of the butterfly, but rarely admit the changes it has gone through to achieve that beauty” ~ Maya Angelou
CUPS Online Help (http://localhost:631/help)