I would like to add custom page sizes to my printer's .ppd (PostScript printer definition) file. What do I have to add to get a new page size working properly?
You have to add values for each additional page size at 4 different places:
PageSize
,PageRegion
,ImageableArea
andPaperDimension
Best, you take one PPD and search for sections enclosed in these keywords
*OpenUI *PaperSize: PickOne
....
*CloseUI *PaperSize
.
*OpenUI *PageSize: PickOne
....
*CloseUI *PageSize
and for the sections starting with
*DefaultImageableArea: ...
.
*DefaultPaperDimension: ...
Use the lines you find in there as templates for your new entries. Note, that dimensions are given in PostScript points (where 72pt == 1inch ~= 2.54cm).
Caveats:
cupstestppd
utility (available on Linux and on Mac OS X).Regarding testing the PPD with cupstestppd
:
By default, this will report errors as **FAIL**
even if it finds some "not-so-important" syntax issues (PPD string translations, filters, UIConstraints, profiles, media sizes). You can relax these strict checks a bit and use -W all
in order to report all these as warnings only, not as errors:
cupstestppd -W all /path/to/PPDfile.ppd
If this returns lines saying WARN size ...
you should pay close attention to them and make sure you fix the PPD.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With