Tweaking PPD for margins & duplex printing (Brother DCP-9045CDN)

Hello folks,

Brother DCP-9045CDN all-in-one machine, used as a shared network printer. Works fine with factory PPD, but had two issues:

  • [SOLVED] Printing areas were not correctly defined, so that full-page prints went right to the edge of the paper, while the printer only goes to a few mm from the edge (example: top half of Firefox URI header line would be missing).
  • Duplex is tricky to use.

I solved the first one by editing the PPD file as follows:

Was:

*ImageableArea A4/A4:                         "0 0 595 842"

Now:

*ImageableArea A4/A4:                         "12 18 583 824"

And likewise for other sizes.

(I’m not sure what units these are, but based on DIN A4 paper, it would be something like 1unit=0.353mm; thus the above modification added margins of about 4mm L/R and 6mm top/bottom.)

So far so good.

Duplex printing: if I click File>Print>Options>Options in the Konqueror browser (or likewise in any other application), the options for duplex printing are greyed out (disabled). Typically there are three options: No duplex | Long side | Short side.

However, if I click Properties (next to the printer name) and then Advanced, voilà: there is a parameter General>Two-sided printing with three options: DuplexTumble | DuplexNoTumble | OFF. (Note: “tumble” is the equivalent of “short side”.)

There are several downsides to this: for one, the setting is remembered, which is not usually what the next user wants. Second, in a network context, it means the only way to make duplex work is by giving everyone access to the printer’s advanced settings (not good… think Murphy’s Law, etc.).

Now, I suspect that I can fix this by changing something in the following section of the PPD file; perhaps a simple case of using standard terms (rather than Brother’s own creations) so that CUPS knows what to do with it:

*%=== BRDuplex ================================
*OpenUI *BRDuplex/Two-Sided Printing: PickOne
*OrderDependency: 25 AnySetup *BRDuplex
*DefaultBRDuplex: DuplexNoTumble
*BRDuplex DuplexTumble/DuplexTumble: "          "
*BRDuplex DuplexNoTumble/DuplexNoTumble: "          "
*BRDuplex None/OFF: "          "
*CloseUI: *BRDuplex

Can anyone help me out here? (Full PPD file here.) What should I change so that applications’ print dialogue “Duplex” options will work?

Thanks in advance,
K.