Lp and lpr postscript printing behaviour

cupspostscriptprintingraspbian

I recently created a wireless print server with cups and samba on raspbian. I'm able to print from every device on my home network but I noticed a strange behaviour: when I print a postscript file directly from the raspberry pi lp works perfectly, while lpr prints a lot of sheets, the majority blank, some with random lines. Has someone experienced the same? Can someone give me or point me to a clear explanation about how gs, lp, lpr and cups interoperate?

Best Answer

CUPS is the printing system under Linux. In particular, it provides a server and clients. The lp and lpr are two common commands to print files: lpr is the BSD one, and lp the System V one. There exist various implementations (more or less compatible with the original commands), but nowadays they should be CUPS clients. You should check that with dlocate or dpkg -S: if raspbian is like Debian, lp should be provided by cups-client and lpr should be provided by cups-bsd (both binary packages are from the cups source package). AFAIK, gs is unrelated on the client side.

Your problem is quite strange since lp and lpr should behave in the same way (if they are both the CUPS clients). To solve your problem, I suggest that you look at strace output to see if there are important differences. For instance, see what files under your home directory and under /etc are read.

Related Question