ppdc
Convert PostScript Printer Description files
SYNOPSIS
ppdc [ options ] filename.ppd [ ... ]
This command processes one or more PPD files.
By default, ppdc compiles the specified PPD files and writes the binary output to standard output (stdout). This output is typically redirected to a new file, for example: ppdc input.ppd > output.binary.
When used with the -N option, ppdc acts solely as a validator, checking the PPD file's syntax and structure without producing compiled output.
PARAMETERS
-D name=value
Defines a variable for conditional compilation. This is useful for building PPD files that adapt to different environments or printer models based on predefined values.
-I directory
Specifies an additional directory to search for included PPD files or other resources referenced within the main PPD.
-M directory
Specifies a migration directory. This option is used when updating PPD files that might have changed structure or options, allowing for backward compatibility handling.
-N
Do not compile the PPD file; only validate its syntax and structure. This option is primarily used for debugging and ensuring PPD file correctness.
-P
Pre-filter the PPD file. This option removes comments, whitespace, and performs basic optimizations, resulting in a cleaner and potentially smaller PPD file, without full binary compilation.
-W
Suppress warnings. This option prevents ppdc from displaying non-critical warning messages during processing, which can be useful when dealing with PPD files that are known to generate minor warnings but are otherwise functional.
DESCRIPTION
ppdc is the PostScript Printer Description Compiler for the Common Unix Printing System (CUPS).
Its primary role is to process PPD (PostScript Printer Description) files. PPD files are standardized text files that describe the capabilities and features of PostScript printers, including supported paper sizes, resolutions, duplexing options, and various device-specific settings.
When ppdc compiles a PPD file, it converts the human-readable text format into a more compact and efficient binary representation. This binary format allows CUPS to load and parse printer capabilities much faster, improving performance, especially in environments with many printers or complex PPD files.
Beyond compilation, ppdc also serves as a validator. It can check PPD files for syntax errors, compliance with Adobe's PPD specification, and other common issues, helping printer driver developers ensure the correctness and robustness of their PPDs. Additionally, it can pre-filter PPD files to remove comments or optimize their structure, which can be useful for distribution or specific CUPS configurations.
CAVEATS
While ppdc is essential for traditional PPD-based printer configurations, modern printing standards like IPP Everywhere are increasingly common.
These newer standards aim to reduce the reliance on PPD files by providing more standardized and auto-discoverable printer capabilities.
Consequently, ppdc's direct utility might decrease for purely IPP-based setups, though it remains crucial for supporting a vast array of legacy and feature-rich PostScript printers.
OUTPUT FORMATS
By default, ppdc compiles PPD files into a binary format optimized for CUPS.
However, with the -P option, it can produce a 'pre-filtered' text PPD, which is an optimized version of the original PPD without comments or extraneous whitespace, but still in human-readable text format.
Without any output redirection, the compiled binary is sent to standard output (stdout).
PURPOSE OF PPD COMPILATION
The compilation of PPD files into a binary format significantly speeds up the loading and parsing of printer capabilities by the CUPS daemon (cupsd).
This is especially beneficial in large printing environments or when dealing with complex PPD files that contain numerous options and constraints, ensuring quicker printer setup and job processing.
HISTORY
ppdc is an integral part of the CUPS (Common Unix Printing System) project, which was originally developed by Easy Software Products and first released in 1997.
CUPS revolutionized printing on Unix-like systems by providing a standardized, modular, and network-aware printing solution.
As PPD files were central to describing printer capabilities in the PostScript world, a dedicated tool like ppdc was necessary to efficiently manage and optimize these files for the CUPS scheduler.
Its development has closely mirrored that of CUPS, evolving to support new PPD features and maintain compatibility across various PostScript specifications.