adding a tray to ppd for cups/samba (hp 2420dn) (InputSlot Tray3)

By thomas, 25 August, 2009
We share our printers out from cups using samba. It was working great until a recent update broke the drivers from the windows/samba side. I decided to redo the configuration and use the cups driver for everything. Only problem was that after doing that I couldn't add the third (optional) tray to our HP 2420DN. After reading a little about PPD and using cupsaddsmb to install the cups driver for windows clients, I came up with this hack job that appears to be working.

I added another tray InputSlot definition. By scouring other PPD's and the cups wiki I found that Tray3 should be MediaPosition 1 on this printer. It is different for other models, on one model it was 7, go figure. *InputSlot Tray3/Tray 3: "> setpagedevice" Then I change the InputSlot save *?InputSlot: " save [(Tray3) (None) (Tray1) (Tray2)] statusdict /papertray get exec {get exec} stopped { pop pop (unknown) } if = flush restore " Then to be safe, I copied any references to Tray2. *% Tray Constraints *% ================================================== *% Tray 3 *% ====== *UIConstraints: *PageSize Env10 *InputSlot Tray3 ... *NonUIConstraints: *CustomPageSize True *InputSlot Tray3 *NonUIConstraints: *InputSlot Tray3 *CustomPageSize True ... *%------------------------------------------------------------ *UIConstraints: *MediaType Labels *InputSlot Tray3 *UIConstraints: *MediaType Transparency *InputSlot Tray3 *UIConstraints: *MediaType Card_Stock *InputSlot Tray3 *UIConstraints: *MediaType Envelope *InputSlot Tray3 After that, from the windows clients I could see Tray 3 in the Device Settings tab. And once I authenticated, I could actually change it to Legal paper, yay. One caveat to watch out for, I had to edit multiple ppd's. I had to do this for the ppd in /etc/cups/ppd, the one in /etc/samba/drivers/W32X86/3 and /etc/samba/drivers/W32X86

Good luck.