Skip to content

ErxrilOwl/angular-printer-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular - QZ Tray Printer Service

This project was created to integrate QZ Tray Printer Service to an Angular Application. This is done by following the resources for integration of QZ Tray and making some code to make it work like a magic! :)

Steps to Recreate

  1. Setup the dependencies for QZ Tray and generate your own keys. Following this url (https://ijustlearnedsomethingnewtoday.blogspot.com/2017/04/using-self-signed-certificates-with-qz.html)

  2. Add qz-tray.js, rsvp-3.1.0.min.js and sha-256.min.js to your src/scripts directory

  3. reference those script files to your scripts array on angular.json

    Sample :

    "scripts": [
        "src/scripts/qz-tray.js",
        "src/scripts/rsvp-3.1.0.min.js",
        "src/scripts/sha-256.min.js"
        ...
    ]
  4. Run the command and reference it again to your angular.json

    npm install --save jsrsasign
  5. Declare a typings for the jsrsasign on your tsconfig.json

    "typeRoots": [
        "src/typings/jsrsasign.d.ts" ,
        ...
    ],
  6. Create a typings directory under src/ and add the typing for typescript of jsrsasign

    https://github.com/kinoh/DominoBridge/blob/master/libs/jsrsasign.d.ts

  7. Include the QZ Tray functionalities to service and import the jsrassign

    Sample

        import * as KJUR from 'jsrsasign';

Useful resources for the integration

A big thanks for the author those references! :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published