Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

codify-node

bojovypstros508GPL-3.01.3.1TypeScript support: included

Generates 1D, 2D, and composite barcodes in png, svg, or eps formats.

barcode, code 128, qr, ean, upc, isbn, pdf417, gs1, aztec, data matrix, usps onecode, codify

readme

Codify

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

We have based this package on symbology and are contributing to the code from them.

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.

Major changes made to this package regards of origin are:

  • fixed version of zint packed up with the package
  • fixed building zint

Documentation

Read the docs →

Quick start

npm add codify-node

Quick Examples

Code 11 Example

import { SymbologyType, createStream } from 'symbology'

(async () => {
  const { data } = await createStream({
    symbology: SymbologyType.CODE11
  }, '8765432164')

  console.log('Result: ', data)
})()

This will log:

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

And the base64 PNG generated will look like:

code 11

MaxiCode Example

import { SymbologyType, createFile } from 'symbology'

(async () => {
  const { data } = await createFile({
    symbology: SymbologyType.MAXICODE,
    option1: 2,
    primary: '999999999840012',
    fileName: 'maxiCodeExample.svg'
    showHumanReadableText: false,
  }, 'Secondary Message Here')

  console.log('Result: ', data)
})()

This creates maxiCodeExample.svg which looks like:

MaxiCode

USPS Example

import { SymbologyType, createFile } from 'symbology'

(async () => {
  const { data } = await createFile({
    symbology: SymbologyType.ONECODE
    fileName: 'uspsExample.eps'
  }, '01234567094987654321-01234')

  console.log('Result: ', data)
})()

This creates uspsExample.eps which looks like:

USPS

License

GPL-3.

changelog

zint (2.6.0) stable; urgency=medium

  • Update to Qt5
  • Ouput to EMF and TIF

    -- Robin Stuart rstuart114@gmail.com Fri, 12 May 2017 09:00:00 +0000

zint (2.5.1) UNRELEASED; urgency=medium

  • Include support for DotCode
  • Include support for Han Xin (Chinese Sensible) code.
  • Reinstate Codablock-F support.
  • Automated ECI pre-processing.
  • Ouput to BMP, GIF and PCX.
  • Huge code review and numerous bugfixes
  • DMRE support and DataMatrix bugfixes

    -- Robin Stuart rstuart114@gmail.com Fri, 13 Jan 2017 20:33:54 +0000

zint (2.4.1) unstable; urgency=low

  • Update and review of files required by Debian including changelog.

    -- Robin Stuart robin@zint.org.uk Sat, 02 Oct 2010 09:26:00 +0000

zint (2.4) unstable; urgency=low

  • Built extensions to the API for integrating with glabels thanks to Sam Lown and Jim Evins.
  • Added code optimisation and input from stdin thanks to Ismael Luceno.
  • Reinstated escape character input.
  • Simplification of Barcode Studio.

    -- Robin Stuart robin@zint.org.uk Sat, 02 Oct 2010 05:00:00 +0000

zint (2.3.2) unstable; urgency=low

  • Corrected many bugs in GS1 DataBar Extended thanks to the careful study of the code by Pablo Orduña at the PIRAmIDE project.
  • Similarly corrected some bugs in Maxicode thanks to Monica Swanson at Source Technologies.
  • Also minor bugfixes for ISBN and Aztec Code, and added some small features like a --square option in the CLI.

    -- Robin Stuart robin@zint.org.uk Sat, 02 Oct 2010 04:00:00 +0000

zint (2.3.1) unstable; urgency=low

  • Removed Codablock-F.
  • Redesigned scale function so that human readable text and Maxicode symbols can be scaled consistently.
  • Corrected encoding bugs with Code 128/Code 16k and Data Matrix ECC 050.
  • Added --notext option to CLI.

    -- Robin Stuart robin@zint.org.uk Sat, 02 Oct 2010 03:00:00 +0000

zint (2.3) unstable; urgency=low

  • Fixed problems with Micro QR Code and rebuilt QR Code support removing dependence on libqrencode.
  • Improved Kanji character support for QR Code and Micro QR Code which now auto-detects and automatically converts to Shift-JIS.
  • Added Grid Matrix symbology with Kanji character support and automatic conversion to GB 2312.
  • Removed no_qr compile option.
  • Advanced Barcode Studio version number to match library version number.

    -- Robin Stuart robin@zint.org.uk Sat, 02 Oct 2010 02:00:00 +0000

zint (2.2.2) unstable; urgency=low

  • A beta release previewing the new API structure.
  • Better NULL character support with "nullchar" value removed.
  • Added loading from file and sequence dialogs in Barcode Studio.

    -- Robin Stuart robin@zint.org.uk Sat, 02 Oct 2010 01:00:00 +0000

zint (2.2.1-1) unstable; urgency=low

zint (2.2.1) unstable; urgency=low

  • bug fixes. Affected symbologies are Data Matrix, USPS One Code, Aztec Code, PDF417, MicroPDF and Composite symbols. If you use any of these then please update.

    -- BogDan Vatra bogdan@licentia.eu Fri, 07 Aug 2009 15:04:12 +0300

zint (2.2.0-1) unstable; urgency=low

  • Debian testing/sid and (*)ubuntu debug packages

    -- BogDan Vatra bogdan@licentia.eu Thu, 06 Aug 2009 21:57:37 +0300

zint (2.2.0) unstable; urgency=low

  • Code One encoding
  • Another round of bugfixes
  • GS-1 data can now be encoded in Code 49 symbols
  • The Qt GUI has been renamed to "zint-qt" and now includes a handy reset button.

    -- BogDan Vatra bogdan@licentia.eu Tue, 04 Aug 2009 18:44:39 +0300

zint (2.1.3-1) unstable; urgency=low

  • Much improved GUI experience - now with a "save" button so that the GUI actually does something!
  • Also included are, of course, Code 49, Channel Code, Japanese Postal Code.
  • A shed load of bugfixes.

    -- BogDan Vatra bogdan@licentia.eu Wed, 20 May 2009 10:51:18 +0300

zint (2.1.3) unstable; urgency=low