All Projects → werthdavid → Ngx Kjua

werthdavid / Ngx Kjua

Licence: mit
Angular QR-Code generator component using kjua.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Ngx Kjua

Qrcode
QR-code encoder/decoder (no image recognition)
Stars: ✭ 34 (-33.33%)
Mutual labels:  qr-code, qrcode-generator, qrcode
React Qr Svg
React component for rendering SVG QR codes
Stars: ✭ 134 (+162.75%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Awesome Qr.js
An awesome QR code generator written in JavaScript.
Stars: ✭ 1,247 (+2345.1%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Qrbtf
An art QR code (qrcode) beautifier. 艺术二维码生成器。https://qrbtf.com
Stars: ✭ 1,391 (+2627.45%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Php Qrcode
A QR Code generator for PHP7.4+
Stars: ✭ 685 (+1243.14%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Qr Ascii
A small library to generate QR codes with ascii
Stars: ✭ 63 (+23.53%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Awesomeqrcode
An awesome QR code generator for Android.
Stars: ✭ 1,718 (+3268.63%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Qrcode
💮 amazing QRCode generator in Python (supporting animated gif) - Python amazing 二维码生成器(支持 gif 动态图片二维码)
Stars: ✭ 8,613 (+16788.24%)
Mutual labels:  qrcode, qr-code, qrcode-generator
QRCode-Generator-PHP-Class
🚀 QRCode PHP class (library). QR Code Generator using vCard 4.0 and the Google Chart API
Stars: ✭ 91 (+78.43%)
Mutual labels:  qrcode, qr-code, qrcode-generator
Offline Qr Code
📱 Browser add-on allowing you to quickly generate a QR code offline with the URL of the open tab or other text!
Stars: ✭ 193 (+278.43%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Barcode
barcode.php - Generate barcodes from a single PHP file. MIT license.
Stars: ✭ 141 (+176.47%)
Mutual labels:  qr-code, qrcode-generator, qrcode
nova-qrcode-field
A Laravel Nova field to generate QR Code
Stars: ✭ 28 (-45.1%)
Mutual labels:  qrcode, qr-code, qrcode-generator
QRCodeFX
Simple tool to generate/read QR Code and export it.
Stars: ✭ 31 (-39.22%)
Mutual labels:  qrcode, qr-code, qrcode-generator
QR Attendance
This project is an attendance system which provides attendance on scanning QR code. The attendance is stored in Excel sheet named with the date of attendance taken. In this folder a file named Generate.py is used to generate the QR code for given input file. Attend.py file is for scanning the QR code
Stars: ✭ 17 (-66.67%)
Mutual labels:  qrcode, qr-code, qrcode-generator
Swiftscan
A barcode and qr code scanner( 二维码/条形码扫描、生成,仿微信、支付宝)
Stars: ✭ 293 (+474.51%)
Mutual labels:  qrcode-generator, qrcode
qrencode.cr
Crystal bindings for libqrencode (qrencode), a library for QR code generation
Stars: ✭ 28 (-45.1%)
Mutual labels:  qrcode, qrcode-generator
Czxing
C++ port of ZXing and ZBar for Android.
Stars: ✭ 854 (+1574.51%)
Mutual labels:  qrcode-generator, qrcode
ZATCA
An unofficial package maintained by Salla to help developers to implement ZATCA (Fatoora) QR code easily which required for e-invoicing
Stars: ✭ 77 (+50.98%)
Mutual labels:  qrcode, qr-code
Fehelper
😍FeHelper--Web前端助手(Awesome!Chrome & Firefox & MS-Edge Extension, All in one Toolbox!)
Stars: ✭ 3,880 (+7507.84%)
Mutual labels:  qrcode-generator, qrcode
Qml Snippet
some qml snippet.
Stars: ✭ 9 (-82.35%)
Mutual labels:  qrcode-generator, qrcode

NPM version Dependency Status Downloads PRs Welcome Codacy Badge

If you find my work useful you can buy me a coffee, I am very thankful for your support.

Buy Me A Coffee

ngx-kjua

Angular QR-Code generator component.

This is basically an Angular-wrapper for kjua by Lars Jung.

Demo

Demo

StackBlitz

StackBlitz Example for encoding Contacts, Calendar entries, WiFi-settings and more. You can use iPhone's default Camera App, it will decode QR-Codes!

StackBlitz Example with 300 codes at once (async rendering)

StackBlitz Example for generating a PDF with jspdf

Installation

To install this package, run:

npm install ngx-kjua --save

Then import it into your Angular AppModule:

// Common imports
import { NgModule /* , ... */ } from '@angular/core';

// Import the package's module
import { NgxKjuaModule } from 'ngx-kjua';

@NgModule({
    declarations: [ /* AppComponent ... */ ],
    imports: [
    
        // BrowserModule, 
        // ...
        
        NgxKjuaModule,
        
        // other imports...
    ],
    // ...
})
export class AppModule { }

Usage

Once the package is imported, you can use it in your Angular application:

Basic

  <ngx-kjua
    [text]="'hello'"
  ></ngx-kjua>

Advanced

  <ngx-kjua
    [text]="'hello'"
    [renderAsync]="false"
    [render]="'svg'"
    [crisp]="true"
    [minVersion]="1"
    [ecLevel]="'H'"
    [size]="400"
    [ratio]="undefined"
    [fill]="'#333'"
    [back]="'#fff'"
    [rounded]="100"
    [quiet]="1"
    [mode]="'plain'"
    [mSize]="30"
    [mPosX]="50"
    [mPosY]="50"
    [label]="'label text'"
    [fontname]="'sans-serif'"
    [fontcolor]="'#ff9818'"
    [image]="undefined"
    [cssClass]="'image-auto'"
  ></ngx-kjua>

Options

Crisp

As you can set the size of the image, the amount of 'modules' (black/white boxes that make up the QR-code) is calculated based on the size and the amount of quiet modules. The calculation can result in an odd number so that a module is e.g. 4.5 pixels big. The resulting image will be drawn fuzzy if crisp is set to false. Setting it to true will result in 'sharp' lines.

crisp false

crisp true

Label

Kjua lets you embed a text or image to the code. This can be set with the setting mode. This can reduce the readability of the code!

Image

Image as Code

Labelimage and Imagelabel

Use this, if you want a label AND an image. In these modes mSize, mPosX and mPosY can be provided as an array. In mode labelimage, the first value (index 0) of the mSize, mPosX and mPosY arrays is used for the label, the second value (index 1) is used for image and vice versa. Also in labelimage mode, the label is drawn before the image is drawn and therefore kinda "in the background" if the two overlap.

All options

  • text encoded content (defaults to ``)
  • render render-mode: 'image', 'canvas', 'svg' (defaults to image)
  • crisp render pixel-perfect lines (defaults to true)
  • minVersion minimum version: 1..40 (defaults to 1)
  • ecLevel error correction level: 'L', 'M', 'Q' or 'H' (defaults to L)
  • size size in pixel (defaults to 200)
  • fill code color (defaults to #333)
  • back background color (defaults to #fff, for transparent use '' or null)
  • rounded roundend corners in pc: 0..100 (defaults to 0, not working if renderis set to svg)
  • quiet quiet zone in modules (defaults to 0)
  • mode modes: 'plain', 'label' or 'image' (defaults to plain, set label or image property if you change this)
  • mSize label/image size in pc: 0..100 (defaults to 30)
  • mPosX label/image pos x in pc: 0..100 (defaults to 50)
  • mPosY label/image pos y in pc: 0..100 (defaults to 50)
  • label additional label text (defaults to ``)
  • fontname font for additional label text (defaults to sans-serif)
  • fontcolor font-color for additional label text (defaults to #333)
  • fontoutline draw an outline on the label text in the color of the back (defaults to true)
  • image additional image (defaults to undefined, use an HTMLImageElement or base64-string)
  • imageAsCode draw the image as part of the code (defaults to false)
  • renderAsync weather or not rendering is done inside "requestAnimationFrame"-call (defaults to false, use true if you want to generate more than one code (e.g. batch))
  • cssClass additional css-class that will be appended to the div-container that contains the qr-code (defaults to undefined)

More details can be found on larsjung.de/kjua

Async rendering

If you plan to render more than one barcode (e.g. batch-generation) I recommend using renderAsync-flag. It executes the rendering inside a "requestAnimationFrame"-call.

Encoding Contacts, Calendar entries, WiFi-settings, ...

The component comes with a helper-class (QrCodeHelper), that helps you with generating Codes that have information like a Contact encoded. Currently it supports the generation of:

  • SMS: number with optional pre-defined text
  • Call
  • Geo-Information: a point on the map with Latitude and Longitude
  • Events
  • Email: recipient with an optional subject and text
  • WiFi: SSID with optional password and a flag for hidden WiFis
  • Contact Information: name with optional address, telephone-number(s), email, url.

Contact Encoding is done with MECard-format and NOT VCard! VCard gives a longer string and therefore a bigger code which potentially has a negative impact on readability for scanners. You can, of course, create a VCard string as well but the format is more complex.

Generate PDF

See the example above. It works with pure kjua and has in fact nothing to do with ngx-kjua but I thought somebody might find it useful.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].