Socket
Socket
Sign inDemoInstall

symbology

Package Overview
Dependencies
146
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    symbology

Generate 50+ different 1D or 2D barcodes in png, svg, or eps formats.


Version published
Weekly downloads
460
decreased by-27.67%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

2.0.0 (2021-03-29)

Bug Fixes

  • adds patch system to apply stdout fixes (d0ac5bc)
  • adds support for Node v12+ (bffc800)
  • appveyor: update script to include debug msg and wrap conditionals (#26) (2859265)
  • binding: updates lib to properly convert bitmap chars (51c0990)
  • powershell bug (#27) (c8e6fdf)
  • unix: removes remaining png.c refs; enables pipe() for non-Win32 (7131d1c)
  • version: adds missing C file ref, version mgmt (#37) (0903303)

Features

  • alpha: implements alpha channel support #35 (993699b)
  • encoding: adds encoding support for ECI and input modes (#30) (e9ff0d0)
  • implements ability to alter dot size #32 (32b9b42)
  • rotation: implements rotations #31 (11b69e6)
  • windows: adds Node 11+ support (#23) (915f15c)
  • zint: upgrades to v2.9.1 (3bd4855)

BREAKING CHANGES

  • zint: drops support for Node 10 and 11.

Readme

Source

Symbology

A Node.js module that generates barcode images. Supports 50+ different 1D or 2D symbologies in png, eps, or svg formats.

Code coverage npm version

Introduction

This Node.js module will allow you to generate over 50+ different types of 1D or 2D symbologies, including barcodes for books, grocery, shipping carriers, healthcare, and international codes.

It can create a PNG, SVG, or EPS image file, or return a string containing SVG, PostScript, or base64-encoded PNG data.

Documentation

Read the docs →

Quick start

yarn add symbology

Quick Examples

Code 11 Example

const symbology = require('symbology')

symbology
  .createStream({
    symbology: symbology.Barcode.CODE128
  }, '8765432164')
  .then((data) => {
    console.log('Result: ', data)
  })

This will log:

{
  "data": "data:image/png+data;base64,PHN [...] eFd==",
  "message": "",
  "code": 0
}

And the base64 PNG generated will look like:

code 11

MaxiCode Example

symbology
  .createFile({
    symbology: Symbology.Barcode.MAXICODE,
    option1: 2,
    primary: '999999999840012',
    fileName: 'maxiCodeExample.svg'
  }, 'Secondary Message Here')
  .then((data) => {
    console.log('Result: ', data)
  })

This creates maxiCodeExample.svg which looks like:

MaxiCode

USPS Example

symbology
  .createFile({
    symbology: Symbology.Barcode.ONECODE
    fileName: 'uspsExample.eps'
  }, '01234567094987654321-01234')
  .then((data) => {
    console.log('Result: ', data)
  })

This creates uspsExample.eps which looks like:

USPS

License

GPL-3.

Keywords

FAQs

Last updated on 29 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc