Jump to content

Direct printing can be done like this.


itognet

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :) 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...