11. PPD Extensions
Table of Contents
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
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. Consult your SavaPage Service Provider before implementing.
11.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 ①
*VENOption *VENOptionValue-1 IppValue-1 ②
...
*VENOption VENOptionValue-n IppValue-n
- 1:
VENOptionmust be replaced by itsPPDequivalent (theVENprefix stands for vendor specific).- 2:
VENOption / VENOptionValuepairs, whose values must be copied from the vendorPPD.IppValueis the IPP value equivalent. The optional asterix*prefix ofVENOptionValuetells if the value is the default.The
IppValuemust be unique in theVENOptionset, while theVENOptionValuecan be used more than once. In this way different IPP values can be mapped to the same PPD value.
Note
VENOption / VENOptionValuepairs 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.
11.1.1. Mapping PPD to IPP
IANA IPP attributes available for mapping are presented in the sections below.
11.1.1.1. copies
*VENCopies copies
11.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
# ...
11.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
11.1.1.4. media-type
*VENMediaType media-type
*VENMediaType *VENPaper paper
*VENMediaType VENTransparency transparency
*VENMediaType VENLabels labels
*VENMediaType VENLetterhead letterhead
11.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
11.1.1.6. print-color-mode
*VENPrintColorMode print-color-mode
*VENPrintColorMode *VENMonochrome monochrome
*VENPrintColorMode VENColor color
11.1.1.7. print-scaling
*VENPrintScaling print-scaling
*VENPrintScaling *VENFit fit ①
*VENPrintScaling VENNone none ②
*VENPrintScaling VENAuto auto ③
- 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
autoapplies 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 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.
11.1.1.8. printer-resolution
*VENResolution printer-resolution
*VENResolution *VEN150dpi 150x150 DPI ①
*VENResolution VEN300dpi 300x300 DPI ②
*VENResolution VENnnndpi nnnxnnn DPI|DPC ③
- 1:
150x150Dots Per Inch (DPI) as default.- 2:
300x300Dots Per Inch (DPI).- 3:
General format: any combination of
DPI(Dots Per Inch) orDPC(Dots Per Centimeter).
11.1.1.9. 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.
11.1.1.10. sides
*VENSides sides
*VENSides VENOneSided one-sided
*VENSides *VENTwoSidedLongEdge two-sided-long-edge
*VENSides VENTwoSidedShortEdge two-sided-short-edge
11.1.2. Mapping PPD to IPP Extensions
PPD Options can be mapped to Internal IPP Extensions. For example:
*VENStapleOption org.savapage-finishings-staple ①
*VENStapleOption *VENNone 3 ②
*VENStapleOption VENTopLeft 20 ③
*VENStapleOption VENBottomLeft 21 ④
- 1:
VENStapleOptionis mapped to org.savapage-finishings-staple.- 2:
VENNonevalue ofVENStapleOptionis mapped to IPP enum value3(none). The asterix*tells this options is the default.- 3:
VENTopLeftvalue ofVENStapleOptionis mapped to IPP enum value20(staple-top-left).- 4:
VENBottomLeftvalue ofVENStapleOptionis mapped to IPP enum value21(staple-bottom-left).
11.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.
11.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
11.1.3.2. print-scaling
For example, option print-scaling can be restricted to value
none like this:
*print-scaling print-scaling
*print-scaling none none
In this case the Fit option is not shown in the Printer Settings dialog. See Page Scaling.
Assuming tray-1 contains A4 and tray-2 contains A3
media, you can enforce a scaling policy with
SPSubst rules.
# Expose attribute in full
*print-scaling print-scaling
*print-scaling fit fit
*print-scaling none none
*print-scaling *auto auto
# Do NOT scale in tray-1 (A4)
*SPSubst/print-scaling/fit: A4-scale-none \
media-source/tray-1 \
*none
# Scale in tray-2 (A3)
*SPSubst/print-scaling/none: A3-scale-fit \
media-source/tray-2 \
*fit