3.2.0 • Published 7 years ago

qr-image v3.2.0

Weekly downloads
51,973
License
MIT
Repository
github
Last release
7 years ago

qr-image

npm version

This is yet another QR Code generator.

Overview

  • No dependecies;
  • generate image in png, svg, eps and pdf formats;
  • numeric and alphanumeric modes;
  • support UTF-8.

Releases

Installing

npm install qr-image

Usage

Example:

var qr = require('qr-image');

var qr_svg = qr.image('I love QR!', { type: 'svg' });
qr_svg.pipe(require('fs').createWriteStream('i_love_qr.svg'));

var svg_string = qr.imageSync('I love QR!', { type: 'svg' });

More examples

qr = require('qr-image')

Methods

  • qr.image(text, [ec_level | options]) — Readable stream with image data;
  • qr.imageSync(text, [ec_level | options]) — string with image data. (Buffer for png);
  • qr.svgObject(text, [ec_level | options]) — object with SVG path and size;
  • qr.matrix(text, [ec_level]) — 2D array.

Options

  • text — text to encode;
  • ec_level — error correction level. One of L, M, Q, H. Default M.
  • options — image options object:
    • ec_level — default M.
    • type — image type. Possible values png (default), svg, pdf and eps.
    • size (png and svg only) — size of one module in pixels. Default 5 for png and undefined for svg.
    • margin — white space around QR image in modules. Default 4 for png and 1 for others.
    • customize (only png) — function to customize qr bitmap before encoding to PNG.
    • parse_url (experimental, default false) — try to optimize QR-code for URLs.

Changes

  • Use zlib.deflateSync instead of pako.
  • Fix deprecation warning for NodeJS 7.

TODO

  • Tests;
  • mixing modes;
  • Kanji (???).
@recylink/orion-js-auth@jdutchak/argosidmedicus-pdf-generator-alaanew-alaa-testgenerator-medicus-pdfmedicus-pdf-generatorbo-enginemsi.faca.coreescpos-upside-downuni-utilwechaty-puppet-wechat4u-tp@deadcanaries/orc@orcproject/orcescpos-upsidebds_maneger_api@the-bds-maneger/bds_maneger_apiunicloud-apiisv-lynx-dev@abaxx/a-id@infinitebrahmanuniverse/nolb-qr@paiondata/nextwikiretail_apinativescript@everything-registry/sub-chunk-2509@d-protocol/d-libdexhigh-wallet-testdecreditondoc-recogdlj-nsm-qrcodedocmakedocs-writterdingtalk-design-clidingtalk-miniapp-opensdkdistinctioseddqrcodesuniqueway-wechatyuniqueway-wechaty-puppet-padchatebuypay-sdkebuypay-sdk-testegg-doras-contentegg-dora-alipaysystemegg-dora-contenturbit-paper-collateral-renderernode-printer-escposnode-poster-gmnode-red-contrib-hannabotuport-transportsuport-verify-emailuport-verify-email-devurl-qrcodeuport-coreuport-libnode-red-contrib-chatbotnode-red-contrib-chatbot-customnode-red-contrib-aliyun-livinglinktype.eenode-gp-printeregg-born-module-a-base-syncunique-wechatyunique-wechaty-puppet-macprounique-wechaty-puppet-mockunique-wechaty-puppet-padplusunique-wechaty-puppet-padpronode-wprintelectron-ssrnetfly-ssmgrturkcellmulticore-walletmysvtwo-factorvue-escposvtuzxvtuzx-coreuebeth-sdk-walletqueen-diana-apico-qrcyberchefcyberchef-mindflowcyberchef-nodedapparatusdex-sdk-wallettrsumultiple-quick-koamy-ip-uitraverse-transportsmychipsneotracker-shared-webzr-escpos@morjs/utilsquickgame-server@sensorfactdev/labelify@node-escpos/core@showings_quix/quixhasuhc-basis-nodehap-clihap-deps@plutonication/plutonication@singhn/qrcode-generator-logo
3.2.0

7 years ago

3.1.0

9 years ago

3.0.2

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.0

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago