I have a VM with Windows 2008 R2 server that runs a program that extracts text from PDF files by means of OCR. It installs a virtual printer that converts PS to PDF. That printer is "connected" to the server on a Standard TCP/IP port using LPR. The conversion program acts as the LPR server listening on port 515. I don't have the Printing and Document service role installed.
The server is behind a firewall and printing should occur on a VPN tunnel over the Internet. The security guys at my company don't want to open up the firewall for SMB/CIFS. So instead, I want to share that printer with clients, also using TCP/IP and LPR. When I print to it from a Windows 7 client computer the print job is received by the server and is also properly processed. However, after a couple of seconds, when the print job has disappeared in the printer's queue on the client, it suddenly reappears and is processed again. This seems to repeat indefinitely.
First, I thought that this was due to the server and client both talking to the printer using the same IP address and port and thus somehow pushing the print job back and forth. I gave the server a second network card and used that second IP address on the client to send print jobs. But it gave me the same result.
The next thing I tried was to publish the printer using the Internet Printing feature of Windows 2008. It installs IIS and shares the printer using the IPP protocol. It worked concerning the reception of the print job, which I confirmed using the IIS Printing website that is automatically recreated. However, the conversion program now didn't process the document and again the print job was repeated several times, as it showed up in the Documents List on the IIS Printing website.
My question is: How do I share the printer with clients over the network, not using SMB?