Skip to content

Websocket server to interface a website with a printer

License

Notifications You must be signed in to change notification settings

xjuanc/nwjs-print-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nwjs-print-server

A simple nw.js application that bridges a website to a local printer (I.E. printing recipes from a web application)

Installation

Clone this repo, setup the application using npm install

Usages

server side :

npm start

client side:

$(function () {
    // Connects to localserver
    var printServer = io('http://localhost:9001');
    
    // Waits for connect event
    printServer.on('connect', function () {
        // Launches a raw-print on the selected printer.
        // you can select the default printer using the tooltip menu of the nw.js's tray icon
        printServer.emit('raw-print', 'raw data');
    });
});

About

Websocket server to interface a website with a printer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.3%
  • HTML 15.7%