Windows lpr implementation not finding printer

3

I'm trying to port a linux program to windows 7, that receives an lpr command from a websocket and sends the command to a local vinyl cutter. The windows lpr implementation is different and there is not a lot of advice to go by.

I have enabled the LPR services in windows, and have installed the vinyl cutter as an LPR printer. It prints fine from illustrator or something. However, trying to lpq the printer, or lpr it,

C:\Users\M> lpq -S 127.0.0.1 -P vinyl
Windows LPD ServerError: specified printer does not exist

C:\Users\M> lpq -S <full computer hostname> -P vinyl
Windows LPD ServerError: specified printer does not exist

C:\Users\M> lpq -S google.com -P vinyl
*times out*

This error is pretty hard to find help with by googling; since my printer is local, could it be a permissions issue? I know little about windows. I tried to do it in cygwin but cygwin seems to want to use the windows lpr version too.

erg

Posted 2014-09-07T10:53:12.000

Reputation: 31

Just noticed this question is still open. Did you ever get it solved? – fixer1234 – 2014-11-12T09:31:29.487

Nope. I ended up having to use the windows "print" command, instead of the windows lpr implementation for my application (printing from websockets). This means my program can't be OS independent :( – erg – 2014-11-15T13:58:46.720

Answers

0

The LPD server in Windows doesn't like loopback addresses, try using the actual IP address on the network adapter instead.

Tony Edgecombe

Posted 2014-09-07T10:53:12.000

Reputation: 223

0

Most devices of this kind have Windows drivers and you jump through these kinds of hoops to get them to work in Linux. I would start by trying to use a Windows driver and software with the device connected to the Windows machine. It is usually easier to get a Linux machine to share a Windows device than the other way around. A workaround might even be to just set it up on both machines as a local printer and then move the cable between machines.

Can the device be set up as a network device connected directly to the router (an easier setup)?

If there is a reason why the device needs to be connected to the Linux computer, you might be looking at a permissions issue. Verify that the device is set for public sharing (any user).

Another thought: there are a number of ways to address a networked printer. Try one of the other methods of specifying it (ipp, http, AppSocket, etc.). If you have another linux computer, an easy way is to let it find the printer and then copy the URI.

fixer1234

Posted 2014-09-07T10:53:12.000

Reputation: 24 254