GithubHelp home page GithubHelp logo

yogi-satya / webprint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from micwallace/webprint

0.0 0.0 0.0 111.12 MB

Print directly to printers using Javascript.

JavaScript 1.41% Java 96.59% HTML 2.00%

webprint's Introduction

WebPrint

WebPrint

Print directly to printers using Javascript.

WebPrint is a fork of QZ-print: https://github.com/qzindustries/qz-print

It uses postMessage API and/or ajax calls to communicate with the Java applet. This differs from QZ-print, that uses Java Web Start and the Java deployment framework for communication.

The Java deployment framework is set to be removed in early 2015, I wanted to find another way to use QZ-print, which provides a seamless printing experience for web applications.

See an example.html/webprint.js for usage or click here for a live version of the example.

If WebPrint has helped with your project, please donate to support it's future development.

Donate to WebPrint

OS Compatability

The main Webprint applet (hosted here) is compatible with Windows, OSX and Linux.

Android support is provided via the Android app: https://github.com/micwallace/webprint-android NOTE: Serial and HTML printing is not currently supported on Android.

The javacript library will prompt you to install or open the correct applet if it is not running.

HTTPS usage

If you site uses HTTPS, requests to HTTP server are almost certainly blocked by default due to mixed-content restrictions. Thankfully, WebPrint uses an innovative solution to avoid this by using an intermediary browser tab/window and the postMessage API. This negates the need for end-users to change their browser settings. For an example on how to use this feature, see example.html in the project. Note that the example prints ESC/P formatted data which may not be compatible with all printers.

How this came about

Mid last year I developed an android applet that essentially accepts http requests and forwards them to the specified socket or network printer. https://github.com/micwallace/HttpSocketAdaptor

After a few months I found this solution stopped working due to stronger mixed-content restrictions in most browsers. Thanks to the postMessage API I was able to securely avoid these restrictions.

After that WebPrint was just a matter of time.

Thanks

A big thanks to the qz-print guys for allowing this project to happen and EJ Technologies for providing their excellent cross platform installer.

Install4j

Install4j: Multi-platform installer builder

webprint's People

Contributors

micwallace avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.