LinuxCommandLibrary

ppdmerge

Merge multiple PPD files into one

SYNOPSIS

ppdmerge [options] ppd-file1 ppd-file2 ...

PARAMETERS

-o option=value
    Sets a default option value.

-i file
    Specifies an include file containing PPD snippets.

-m model
    Set the ModelName value in the output PPD file.

-p product
    Set the PCFileName value in the output PPD file.

-u
    Update Mode. Only add or modify existing sections. Do not remove any exiting option/section unless forced.

-v
    Be verbose.

-W
    Allow non-standard syntax.

DESCRIPTION

The ppdmerge command combines information from multiple PPD (PostScript Printer Description) files into a single, unified PPD file. This is particularly useful when dealing with printer drivers that are distributed as separate modules or when you want to customize an existing PPD file with additional options. The command intelligently handles conflicting entries and provides options to control the merging process, allowing users to customize the final PPD to suit their needs.

The core functionality involves reading various PPD fragments, resolving conflicts between them (usually through user-specified options or predetermined precedence rules), and generating a complete and valid PPD file. This newly merged PPD can then be used to configure a printer within a printing system like CUPS (Common Unix Printing System), offering more flexibility and control over printer settings.

CAVEATS

The order of PPD files provided on the command line can be significant, as later files may override settings from earlier ones. Incorrect usage can result in an invalid PPD file, causing printing problems. The program assumes PPD files conform to the Adobe PPD specification; non-compliant files may lead to unexpected behavior.

USAGE EXAMPLE

Combining two PPD files into a single output file:
ppdmerge base.ppd extensions.ppd > combined.ppd

Setting default options during the merging process:
ppdmerge -o Resolution=600dpi base.ppd extensions.ppd > combined.ppd

CUPS INTEGRATION

After creating a merged PPD file, it can be integrated into the CUPS system using lpadmin to configure a printer with the desired settings. This allows the customized driver to be used for printing jobs via CUPS.

HISTORY

The ppdmerge command emerged alongside the development and widespread adoption of CUPS, as a tool to manage and customize printer drivers which are often provided as sets of modular PPD files. This merging enables users to create custom PPDs that match their printer and environment, providing more control than relying on basic, generic printer drivers.

SEE ALSO

lpadmin(8), lpoptions(1), cups(1)

Copied to clipboard