LinuxCommandLibrary

cupstestppd

Test and validate PPD printer description files

TLDR

Test the conformance of one or more files in quiet mode

$ cupstestppd -q [path/to/file1.ppd path/to/file2.ppd ...]
copy

Get the PPD file from stdin, showing detailed conformance testing results
$ cupstestppd < [path/to/file.ppd] -v -
copy

Test all PPD files under the current directory, printing the names of each file that does not conform
$ find . -name \*.ppd \! -execdir cupstestppd -q '{}' \; -print
copy

SYNOPSIS

cupstestppd [-q] [-r relax] [-v] [ppd-file]

PARAMETERS

-q
    Quiet mode: suppress output, use exit status only (0=pass, 1=warnings, 2=errors).

-r relax
    Relax specified checks (e.g., basic,cups,jcl); comma-separated classes to skip strict validation.

-v
    Verbose mode: print detailed error and warning messages.

DESCRIPTION

The cupstestppd command is a utility from the CUPS printing system used to validate PostScript Printer Description (PPD) files. It checks for syntax errors, adherence to Adobe PPD specifications, and compatibility with CUPS-specific extensions.

PPD files describe printer capabilities, such as supported paper sizes, resolutions, and features. cupstestppd parses the file(s) provided as arguments or from standard input, reporting errors (fatal issues preventing use), warnings (potential problems), and informational messages. It ensures the PPD conforms to standards required for seamless integration with CUPS servers.

Common use cases include verifying vendor-supplied PPDs before deployment, testing custom PPDs created with tools like ppdc, or auditing PPDs during printer driver packaging. In verbose mode, it details specific violations, aiding developers in corrections. Relax options allow skipping certain strict checks for legacy files.

Exit status indicates results: 0 for pass, 1 for warnings only, 2 for errors. This makes it ideal for scripts automating PPD validation in build processes or CUPS configurations.

CAVEATS

Does not execute PPD code or test printing; only static validation. Relax mode may allow incompatible files. Requires CUPS libraries.

EXIT STATUS

0: No errors or warnings.
1: Warnings only.
2: Syntax or fatal errors.

STANDARDS

Conforms to Adobe PPD 5.0+ specs and CUPS extensions (e.g., PageSize, AP_CUPS_*). Supports PWG 5100.3 (PPD extensions).

HISTORY

Introduced in CUPS 1.1 (2003) by Easy Software Products (now OpenPrinting). Enhanced in CUPS 2.x for better PWG 5100 compliance and relax options. Maintained by OpenPrinting project.

SEE ALSO

ppdc(8), ppdmerge(1), lpadmin(8), cupsfilter(8)

Copied to clipboard