Jump to content

How to Print a Local Printer in unigui?


Edmar Frazao

Recommended Posts

I have a printer installed on Android see model.

The printer is integrated.

How to print via unigui?

Viewing a PDF and choosing the print option from the browser would be an option.

But I want to print right on the local printer

 

 

http://loja.gertec.com.br/DetalheProduto.aspx?hdfCodigoSku=Y51LAOKZGW#

 

 

 

in portugues:

 

Eu tenho uma impressora instalada no Android veja modelo.

A impressora é integrada.

Como imprimir via unigui?

Visualizar um pdf e escolher a opção imprimir do navegador seria uma opção.

Mas quero imprimir direto na impressora local

Link to comment
Share on other sites

To access a local printer directly you have to set up and

go through a local process, and there are several ways to do that.

 

One is cross-origin resource sharing, CORS, and then the local

process runs an http server being triggered by a JS client call.

 

Another simple way is polling, like your local process does a

regular db polling to see if there is something to be printed.

 

A third way is to start messing with some addons like flash

or java to get direct hardware access. In this case the local

process is loaded on demand, in the previous cases it must

be running beforehand to serve the request.

Link to comment
Share on other sites

  • 1 year later...
On 7/9/2018 at 4:12 PM, Ron said:

To access a local printer directly you have to set up and

go through a local process, and there are several ways to do that.

 

One is cross-origin resource sharing, CORS, and then the local

process runs an http server being triggered by a JS client call.

 

Another simple way is polling, like your local process does a

regular db polling to see if there is something to be printed.

 

A third way is to start messing with some addons like flash

or java to get direct hardware access. In this case the local

process is loaded on demand, in the previous cases it must

be running beforehand to serve the request.

 

Have an example using the flash plugin ???

Link to comment
Share on other sites

Alternatively, create a rest server, 
where you perform a server function every 5 seconds, 
which checks if there are any files to print in a folder, 
if any, you download the file and run the print, 
you will have an app client on the local machine doing this. 
You will have to provide in your web application, 
some resource for your user to download and install this local client.
Link to comment
Share on other sites

On 7/28/2019 at 8:45 AM, mierlp said:

How does 'regulard DB polling to see if there is something to be printed.' working
to print a document with a local printer.?

If you have an application (service) running locally on the machine connected to the printer,
you can then check your server DB every few seconds to see if there is a print job ready.

You can set up a table for print jobs in the DB, and store the jobs there,
and when they get printed you mark the row as done.

So each few seconds connect to db and run query on all unprinted jobs,
and print whatever is unprinted and mark it as printed.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...