Problem with print service

103 views
Skip to first unread message

marcop...@gmail.com

unread,
Feb 21, 2024, 9:07:13 AM2/21/24
to Harbour Users
Dear Friends,

I have an application that runs on a Linux server and is accessed via Putty. So I developed a small printing service to run on Windows and receive data for printing. And I have 2 problems with the service, the first is that I can't start the service from the command line, I can only do it directly from the services panel.
The second is that the server receives the data for printing, processes everything as if it were going to print, generates the data in the print queue, but nothing comes out on the printer (I'm testing with a PDF printer).

Follow the PrintServer and client test.

Thanks to advance,
printServer.prg
tclient.prg

jgt

unread,
Feb 21, 2024, 2:57:13 PM2/21/24
to Harbour Users
If the printer is a network printer,  you can print directly to it using:
cat $file |netcat -h server -p port
If the printer is attached to a Windows system vai usb, serial or parallel, share the printer in Windows,   then install SAMBA on the linux system and refer to the printer as \\server\printer using smbclient.

marcop...@gmail.com

unread,
Feb 21, 2024, 3:17:14 PM2/21/24
to Harbour Users
The server is in the cloud, so there is no connection to the client station to use samba or a shared printer, the connection is via Putty, the server is Linux and the stations are Windows
Reply all
Reply to author
Forward
0 new messages