LPR command won't recognize CUPS printer

I have a cups server with one shared printer configured on it. It prints test pages without problems.

printername (Idle, Accepting Jobs, Shared)
Description:    desc
Location:   
Driver: Zebra ZPL Label Printer (grayscale, 2-sided printing)
Connection: socket://172.20.50.26
Defaults:   job-sheets=none, none media=oe_w288h432_4x6in sides=one-sided

This is the output from lpstat -t. it shows that the printer is idle and accepting requests

admin@SERVER:~$ lpstat -t
scheduler is running
no system default destination
device for printername: socket://172.20.50.26
printername accepting requests since Thu 26 Jan 2012 01:29:35 PM CET
printer printername is idle.  enabled since Thu 26 Jan 2012 01:29:35 PM CET

Now when I want to send a printjob to it via an LPR command it won't recognize the printer

/usr/bin/lpr -P printername test.pdf

Result

lpr: ttn_seg_zebra1: unknown printer

What am I missing here ?


Your printer's name, according to lptstat output is literally "printername".

Running lp -d printername test.pdf or lpr -P printername test.pdf will work.

For example, here's the output from a running system:

[root@Smack ~]# lpstat -t
scheduler is running
no system default destination
device for label: socket://label:9100
device for upstairs: socket://upstairs:9100
label accepting requests since Mon Feb 27 05:18:45 2012
upstairs accepting requests since Mon Feb 27 06:31:23 2012

In this, I have two printers defined; label and upstairs. In order to print to them, I'd have to use those names on the lp/lpr command line.


Per comment below:

Install cups-bsd instead of lpr. Cups-bsd contains its own lpr binaries.

This package provides the BSD commands for interacting with CUPS:

 /usr/bin/lpqa 
 /usr/bin/lpr 
 /usr/bin/lprm 
 /usr/sbin/lpc