Coder Social home page Coder Social logo

themaniacalfry / styled-qr-code Goto Github PK

View Code? Open in Web Editor NEW

This project forked from loskir/styled-qr-code

0.0 0.0 0.0 1.15 MB

Automaticly generate your styled QR code in your web app.

Home Page: https://qr-code-styling.com

License: MIT License

JavaScript 6.35% TypeScript 93.65%

styled-qr-code's Introduction

QR Code Styling

JavaScript library for generating QR codes with a logo and styling.

This is a NodeJS fork of the QR code styling repo qr-code-styling, supporting NodeJs as well as svg exports. If you are looking for browser support head to the original project

Try it here https://qr-code-styling.com

If you have issues / suggestions / notes / questions, please open an issue or contact me. Let's create a cool library together.

Examples

Installation

npm install @loskir/styled-qr-code-node

Usage

import {QRCodeCanvas} from '@loskir/styled-qr-code-node';
const {QRCodeCanvas} = require('@loskir/styled-qr-code-node'); // or CommonJS

const qrCode = new QRCodeCanvas({
  data: 'My text or trl',
  image: 'pathToImage'
});

//"png" | "jpg" | "jpeg" | "pdf" | "svg"
await qrCode.toFile('output.png', 'png');

API Documentation

Styling options

Please refer to the original

Export methods

qrCode.toFile(options) => Promise<void>

Param Type Default Value Description
filePath string the path where the image will be saved
format string ("png" / "jpg" / "jpeg" / "pdf" / "svg") 'png' File format
options skia-canvas RenderOptions undefined see doc

qrCode.totoDataUrl(options) => Promise<string>

Param Type Default Value Description
format string ("png" / "jpg" / "jpeg" / "pdf" / "svg") 'png' File format
options skia-canvas RenderOptions undefined see doc

qrCode.toBuffer(options) => Promise<Buffer>

Param Type Default Value Description
format string ("png" / "jpg" / "jpeg" / "pdf" / "svg") 'png' File format
options skia-canvas RenderOptions undefined see doc

styled-qr-code's People

Contributors

kozakdenys avatar dependabot[bot] avatar kilianb avatar knom avatar loskir avatar justraman avatar dd-jonas 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.