cupsfilter
Convert print files to different formats
SYNOPSIS
cupsfilter [--help] [-c conffile] [-D] [-d debug] [-e engine] [-f format] [-i mimetype] [-m format] [-n copies] [-o name=value] [-p ppd-file] [-P device-uri] [-s] [filename]
PARAMETERS
-c conffile
Use specified CUPS configuration file instead of default.
-D
Delete printer-info, printer-make-and-model, and printer-options attributes from input.
-d debug
Set logging debug level (higher values more verbose).
-e engine
Use raster engine: pwgraster or cupsraster.
-f format
Set output format (e.g., image/pwg-raster).
-i mimetype
Specify input MIME media type.
-m format
Set output MIME media type.
-n copies
Number of copies to generate.
-o name=value
Set printer or job option (repeatable).
-p ppd-file
Specify PPD file for the destination printer.
-P device-uri
Specify printer device URI to auto-locate PPD.
-s
Print supported MIME types and exit.
--help
Display usage information and exit.
DESCRIPTION
cupsfilter is a utility from the CUPS (Common UNIX Printing System) that simulates the print job filtering pipeline used by the cupsd(8) scheduler. It converts an input print file into a format compatible with a specific printer by applying the chain of MIME media type filters defined in the printer's PPD file.
The tool reads the source file (or stdin if unspecified), processes it through the appropriate filters based on input/output MIME types, PPD options, and job attributes, and outputs the result to stdout. This makes it invaluable for testing printer drivers, debugging filter issues, validating print jobs offline, or generating printer-ready data without a full CUPS server setup.
Key features include support for multiple copies, custom job options, debug logging, and selection of raster engines. It relies on CUPS' MIME database and filter executables, typically located in /usr/lib/cups/filter. Without a PPD or device URI, it defaults to generic processing, which may limit functionality.
CAVEATS
Requires PPD file or device URI for full filter chain; defaults to pass-through without. Not for production printing; stdin/stdout only. Depends on CUPS filters being installed.
EXAMPLE
cupsfilter -p /etc/cups/ppd/Printer.ppd -m printer/MyPrinter input.pdf > output.raster
Converts PDF to printer raster format using PPD filters.
DEBUG TIP
Use -d 2 -s to list MIME types and enable moderate logging for troubleshooting filter chains.
HISTORY
Introduced in CUPS 1.1 (2001) by Easy Software Products for filter testing. Evolved with CUPS 2.x (2013+) for PWG Raster support. Now maintained by OpenPrinting.org after Apple donated CUPS in 2015.


