itognet Posted March 10, 2018 Share Posted March 10, 2018 I see many asking for direct printing. Direct print can be done like this. Note, it works only in some scenarios. Scenario 1: One location with serveral users using your unigui project. Scenario 2: Your Windows Unigui server is located on same LAN as the clients. Scenario 1 - Over internet: Client printer has to be a network printer and you have to NAT the printer port 9100 at the gateway/firewall/router at client side. Install the Client printer on the Windows Standalone Unigui server using tcpip, use the wan IP for the client (has to be static) and the NATted printer port. (if you have serveral locations, you could install a printer for each location, and install the printers on the unigui server) Scenario 2 - As Intranet, where Unigui server is located on same LAN as clients: Install the Client printer on the Windows Standalone Unigui server using tcpip, use the printer IP for the printer (has to be static) I dont know if this works if you run your Unigui as ISAPI, I believe that you could do something similar. With the above aproach, you can from your Unigui project print direct to end user network printer, assuming that you have done the NATting right. Quote Link to comment Share on other sites More sharing options...
davidizadar Posted March 12, 2018 Share Posted March 12, 2018 There is another solution: Your uniGUI Server is anywhere (local or in the cloud). Your clients are anywhere. Your printers are anywhere, but you can install an agent with access to one or several of them. This "agent" is usually a Delphi application running as a Windows Service (or on Linux) with access to the server environment hosting the uniGUI Server. The idea is to use the server environment, a central database server or even the server file system, for requesting the print jobs from the web application and use the agents for printing the PDF files. A correctly designed application will allow registering printers, handling permissions, queuing jobs for specific printers. The same approach applies to interactions with local hardware like USB devices. Quote Link to comment Share on other sites More sharing options...
rencarnacion Posted March 12, 2018 Share Posted March 12, 2018 Webocket is the best to handle remote printing Quote Link to comment Share on other sites More sharing options...
itognet Posted March 12, 2018 Author Share Posted March 12, 2018 DavidIzadaR. I see your idea here But it require software installation at enduser and maintenance of that software. But it could work Ronny Encarnacion. I cannot see how you can use Websockets for remote printing, unless your websockets is based on Davids idea. Will you go in details of your idea, please Quote Link to comment Share on other sites More sharing options...
itognet Posted March 12, 2018 Author Share Posted March 12, 2018 DavidIzadaR. I took your idea and changed it alittle :p How about, a little service or a system tray application that does the following: UniPrint monitors the default download folder for Internet Explorer, Firefox, Chrome and other known browsers. If a downloaded file appears and match this pattern eg. uniprint_[filename].* then print the file to default printer and delete the file afterwards. Quote Link to comment Share on other sites More sharing options...
Ron Posted March 13, 2018 Share Posted March 13, 2018 I created a windows service that runs locally, communicating with the receipt printer and the cash register on individual USB-ports, and running a webserver which accepts commands from an indy http client in the unigui app. The app stores the print job as a pdf, saves it to the db, and then just notifies the local service webserver to get the pdf from the db and print it, and report the print and cash drawer open/close status to the db. The local service app is supported by a system tray service control app that also gets intalled, which has options for restarting the service if necessary. Had to set up NAT in the router of course, for the webserver which is inbound, but not for the db connection which is outbound. Quote Link to comment Share on other sites More sharing options...
rencarnacion Posted March 13, 2018 Share Posted March 13, 2018 You can see these option is Open source https://qz.io/ Is already working Quote Link to comment Share on other sites More sharing options...
ajp68 Posted July 8, 2020 Share Posted July 8, 2020 QZ looks interesting. I will appropriate if can provide me sample UniGui integration code for QZ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.