Appendix K. PPD Extensions

Table of Contents

K.1. PPD to IPP Mappings
K.1.1. Mapping PPD to IPP
K.1.2. Mapping PPD to IPP Extensions
K.1.3. Restricting Standard Options
K.2. PPD Rules
K.2.1. Generic PPD Rules
K.2.2. Custom PPD Rules
K.3. IPP Rules
K.3.1. SPConstraint
K.4. Job Extensions
K.4.1. Job Copy Options
K.5. Job Ticket Extensions
K.5.1. Job Ticket Media Options
K.5.2. Job Ticket Sheet Options
K.5.3. Job Ticket Copy Options
K.5.4. Job Ticket Set Options
K.6. Tips and Tricks
K.6.1. Fast Print A4 and Letter to Single Tray
K.7. proxy-print.log

Vendor specific PPD option keywords are generally not mapped to IPP attributes by CUPS. That's why we do not get IPP attributes for finishings (staple, punch, fold, booklet) or collating delivered, when we ask CUPS for an IPP printer description.

To bridge this gap we built our own mapping by means of a so-called PPD Extension .ppde file. With this mapping we are able to identify printer capabilities based on IPP and feed CUPS the vendor specific PPD options as IPP attributes when sending a print job. When printing, these IPP disguised PPD options are neatly applied by CUPS in the context of the PPD driver, so the right PostScript / PCL snippets are injected in the spool file.

PPD Extension files reside in the /opt/savapage/server/custom/cups/ directory. An annotated type-model-version.ppde.template file is installed there for your convenience. The .ppde file can be linked to a Proxy Printer. See Section 4.8.2, “Edit Proxy Printer”. When linked, the mapped PPD options will appear in the Printer Settings Dialog.

Important

When the content of a PPD Extension File, assigned to any Proxy Printer, is changed, you must Synchronize the Proxy Printers to take those changes into effect.

Warning

PPD Extensions is an advanced feature. Please consult your SavaPage Community Representative before implementing.

K.1. PPD to IPP Mappings

The PPDE file holds mappings of original PPD file options to their IPP attribute and values counterparts. Mapped IPP attributes and values can either be IANA registered, or Internal SavaPage Extensions. This is the syntax:

*VENOption IppAttribute                  1
*VENOption *VENOptionValue-1 IppValue-1  2
...
*VENOption *VENOptionValue-n IppValue-n

1

VENOption must be replaced by its PPD equivalent (the VEN prefix stands for vendor specific).

2

VENOption / VENOptionValue pairs, whose values must be copied from the vendor PPD.

IppValue is the IPP value equivalent. The optional asterix * prefix of VENOptionValue tells if the value is the default. The IppValue must be unique in the VENOption set, while the VENOptionValue can be used more than once. In this way different IPP values can be mapped to the same PPD value.

Note

VENOption / VENOptionValue pairs are relevant for IPP attributes that have keyword, enum or boolean syntax, because their values are confined to a predefined set. These pairs are not needed for IPP attributes that have unconfined values, because of their integer, name, or text syntax.

K.1.1. Mapping PPD to IPP

IANA IPP attributes available for mapping are presented in the sections below.

K.1.1.1. copies

*VENCopies copies

K.1.1.2. media

*VENMedia media
*VENMedia  VENA3 iso_a3_297x420mm
*VENMedia *VENA4 iso_a4_210x297mm 
*VENMedia  VENA5 iso_a5_148x210mm
*VENMedia  VENA6 iso_a6_105x148mm
# ...

K.1.1.3. media-source

*VENMediaSource media-source
*VENMediaSource *VENAuto auto 
*VENMediaSource VENMain main
*VENMediaSource VENTop top
*VENMediaSource VENMiddle middle
*VENMediaSource VENBottom bottom
*VENMediaSource VENBypassTray by-pass-tray
*VENMediaSource VENManual manual
*VENMediaSource VENTray1 tray-1
# tray-2 ... tray-10

K.1.1.4. media-type

*VENMediaType media-type
*VENMediaType *VENPaper paper 
*VENMediaType VENTransparency transparency
*VENMediaType VENLabels labels
*VENMediaType VENLetterhead letterhead

K.1.1.5. output-bin

*VENOutputBin output-bin
*VENOutputBin *VENAuto     auto
*VENOutputBin VENBottom    bottom
*VENOutputBin VENCenter    center
*VENOutputBin VENTop       top
*VENOutputBin VENFaceDown  face-down
*VENOutputBin VENFaceUp    face-up
*VENOutputBin VENLargeCap  large-capacity
*VENOutputBin VENLeft      left
*VENOutputBin VENMiddle    middle
*VENOutputBin VENRear      rear
*VENOutputBin VENSide      side
*VENOutputBin VENStacker1  stacker-1
# stacker-2 ... stacker-5
*VENOutputBin VENTray1 tray-1
# tray-2 ... tray-5

K.1.1.6. print-color-mode

*VENPrintColorMode print-color-mode
*VENPrintColorMode *VENMonochrome monochrome 
*VENPrintColorMode VENColor       color

K.1.1.7. print-scaling

*VENPrintScaling print-scaling
*VENPrintScaling *VENFit fit   1
*VENPrintScaling VENNone none  2
*VENPrintScaling VENAuto auto  3

1

Scale the document to fit the printable area of the requested media size, preserving the aspect ratio of the document data without cropping the document.

2

Do not scale the document to fit the requested media size. If the document is larger than the requested media, center and clip the resulting output. If the document is smaller than the requested media, center the resulting output.

3

Value auto applies a 'fit', 'fill' or 'none' method to get an optimized imposition of the document onto the printable area of the requested media size. This is the best method to scale documents with mixed portrait/landscape pages.

See Section 3.5.2.1, “Page Scaling”.

Note

If CUPS does not provide the IPP print-scaling option for a printer, SavaPage falls back to the CUPS fit-to-page boolean attribute to scale documents. Value 1 (true) scales the document up or down to fit the selected media. Value 0 (false) preserves the physical size of the printed document and crops any content outside the selected media.

K.1.1.8. sheet-collate

*VENCollate sheet-collate
*VENCollate *VENCollated  collated
*VENCollate VENUncollated uncollated

When sheet-collate is not mapped, SavaPage generates a single PDF and applies a one-copy print. The PDF is a concatenation of the requested number of copies with pages arranged in the right collate order.

K.1.1.9. sides

*VENSides sides
*VENSides VENOneSided          one-sided
*VENSides *VENTwoSidedLongEdge two-sided-long-edge
*VENSides VENTwoSidedShortEdge two-sided-short-edge

K.1.2. Mapping PPD to IPP Extensions

PPD Options can be mapped to Internal IPP Extensions. For example:

*VENStapleOption org.savapage-finishings-staple  1
*VENStapleOption *VENNone       3  2
*VENStapleOption VENTopLeft    20  3
*VENStapleOption VENBottomLeft 21  4

1

VENStapleOption is mapped to org.savapage-finishings-staple.

2

VENNone value of VENStapleOption is mapped to IPP enum value 3 (none). The asterix * tells this options is the default.

3

VENTopLeft value of VENStapleOption is mapped to IPP enum value 20 (staple-top-left).

4

VENBottomLeft value of VENStapleOption is mapped to IPP enum value 21 (staple-bottom-left).

K.1.3. Restricting Standard Options

Standard CUPS/IPP options, like number-up, are independent of PPD, and available for all printers types. The values of these options can be restricted with PPDE syntax. Below are examples for options currently supported by SavaPage.

K.1.3.1. number-up

For example, option number-up can be restricted to values 1 (default), 2 and 4 like this:

*number-up number-up
*number-up *1 1
*number-up 2 2
*number-up 4 4