ppdcfile(5)

πŸ“¦
version 2.4.19 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

ppdcfile(5) β€” the cups ppd compiler source file format (deprecated, bestie, i'm so serious)

okay so this is a page from the OpenPrinting manual set, and it's all about how you write the meta files that feed the CUPS PPD compiler. it's giving "vintage" in the saddest way possible and we'll get to that. 🫢


✨ NAME ✨

ppdcfile β€” cups ppd compiler source file format (deprecated)

πŸ’– DESCRIPTION πŸ’–

so the CUPS PPD compiler reads meta files β€” little text files that describe one or more PPD files β€” and then generates those PPD files via ppdc(1). this page is a quick reference to the supported keywords, and the vibe is: keep it open next to the online help for CUPS, they're a set. πŸ’…

the source file format is plain ASCII text, so you can open it in literally your favorite text editor, no drama. comments are supported both ways, C style and C++ style:

/* ... */
// ...

printer driver info can be grouped and shared using curly braces:

{ ... }

and here's the important part, no cap: PPD files get written when a close brace or end-of-file is seen and a PCFileName directive has been defined. both. you need both. πŸ‘‘

directives can go anywhere on a line, and they're followed by one or more values. here's the whole list of available directives and the values they accept β€” all of them, every single one, i'm not skipping a thing:

  • #define name value β€” define a name with a value
  • #elif {name | value} β€” else-if, take a name or a value
  • #else β€” the fallback branch
  • #endif β€” close that conditional, periodt
  • #font name encoding "version" charset status β€” declare a font with encoding, quoted version, charset and status
  • #if {name | value} β€” start a conditional on a name or a value
  • #include <filename> β€” include a file using angle brackets
  • #include "filename" β€” include a file using quotes
  • #media name width length β€” a media entry with name, width, length
  • #media "name/text" width length β€” same, but with a quoted name/text
  • #po locale "filename" β€” pull in a translation for a locale from a quoted filename
  • Attribute name "" value β€” attribute with an empty quoted keyword
  • Attribute name keyword value β€” attribute with a plain keyword
  • Attribute name "keyword/text" value β€” attribute with a quoted keyword/text
  • Choice name "code" β€” a choice with a quoted code
  • Choice "name/text" "code" β€” a choice with quoted name/text and quoted code
  • ColorDevice boolean-value β€” is this a color device, true or false
  • ColorModel name colorspace colororder compression β€” color model with colorspace, colororder, compression
  • ColorModel "name/text" colorspace colororder compression β€” same but with a quoted name/text
  • ColorProfile resolution/mediatype gamma density matrix β€” a color profile keyed by resolution/mediatype
  • Copyright "text" β€” the copyright text, in quotes
  • CustomMedia name width length left bottom right top "size-code" "region-code" β€” custom media with all the measurements plus quoted size and region codes
  • CustomMedia "name/text" width length left bottom right top "size-code" "region-code" β€” same, quoted name/text flavor
  • Cutter boolean-value β€” does it cut, yes or no
  • Darkness temperature name β€” darkness with temperature and name
  • Darkness temperature "name/text" β€” darkness with temperature and a quoted name/text
  • DriverType type β€” the driver type
  • Duplex type β€” the duplex type
  • Filter mime-type cost program β€” a filter with mime-type, cost, program
  • Finishing name β€” a finishing option
  • Finishing "name/text" β€” a finishing option with quoted name/text
  • Font * β€” wildcard font, the icon of "all of them"
  • Font name encoding "version" charset status β€” a specific font with encoding, quoted version, charset, status
  • Group name β€” a group
  • Group "name/text" β€” a group with quoted name/text
  • HWMargins left bottom right top β€” hardware margins, all four sides
  • InputSlot position name β€” an input slot at a position with a name
  • InputSlot position "name/text" β€” same but quoted name/text
  • Installable name β€” an installable option
  • Installable "name/text" β€” installable with quoted name/text
  • LocAttribute name "keyword/text" value β€” a localized attribute with quoted keyword/text
  • ManualCopies boolean-value β€” manual copies, true or false
  • Manufacturer "name" β€” the manufacturer, in quotes
  • MaxSize width length β€” max size, width and length
  • MediaSize name β€” a media size by name
  • MediaType type name β€” media type with type and name
  • MediaType type "name/text" β€” media type with type and quoted name/text
  • MinSize width length β€” min size, width and length
  • ModelName "name" β€” the model name, in quotes
  • ModelNumber number β€” the model number
  • Option name type section order β€” an option with type, section, order
  • Option "name/text" type section order β€” option with quoted name/text
  • PCFileName "filename.ppd" β€” the output PPD filename, in quotes. this one is THE one, without it nothing gets written, no cap 🚨
  • Resolution colorspace bits-per-color row-count row-feed row-step name β€” a resolution entry, all the numbers plus a name
  • Resolution colorspace bits-per-color row-count row-feed row-step "name/text" β€” same, quoted name/text
  • SimpleColorProfile resolution/mediatype density yellow-density red-density gamma red-adjust green-adjust blue-adjust β€” simple color profile, keyed by resolution/mediatype, with all the density/gamma/adjust numbers
  • Throughput pages-per-minute β€” throughput, in pages per minute
  • UIConstraints "*Option1 *Option2" β€” two options constrained together
  • UIConstraints "*Option1 Choice1 *Option2" β€” option one with a choice, plus option two
  • UIConstraints "*Option1 *Option2 Choice2" β€” option one, plus option two with a choice
  • UIConstraints "*Option1 Choice1 *Option2 Choice2" β€” both options with choices, the full combo
  • VariablePaperSize boolean-value β€” variable paper size, true or false
  • Version number β€” the version number

😭 NOTES 😭

okay bestie, deep breath.

PPD files are deprecated and will no longer be supported in a future feature release of CUPS.

that's the whole thing, that's the note. 😭 if you've got printers that don't support IPP, you can support them with applications like ippeveprinter(1) instead. the future is now and it's IPP.

πŸ¦‹ SEE ALSO πŸ¦‹

go read these too, they're the friend group:

Copyright Β© 2020-2024 by OpenPrinting.


and that's the page, fr fr. this one came out of the CUPS manual, dated 2021-02-28 β€” if you needed the receipts, there they are. stay iconic, go write your PPDs while you still can. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from