# symbology-1.18.0

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

Latest version **1.18.0** (published 2020-06-30) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install symbology-1.18.0
pnpm add symbology-1.18.0
yarn add symbology-1.18.0
bun add symbology-1.18.0
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.18.0 |
| Published | 2020-06-30 |
| First published | 2020-06-30 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 7 |
| Unpacked size | 287.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | yes |
| Author | Josh Shor |
| Maintainers | john-doherty |
| Keywords | barcode, datamatrix, code128, qr, postal, 1d barcode, 2d barcode |

## Links

- npm: https://www.npmjs.com/package/symbology-1.18.0
- Repository: https://github.com/john-doherty/symbology
- Homepage: https://github.com/john-doherty/symbology#readme
- Issues: https://github.com/john-doherty/symbology/issues
- npm.io page: https://npm.io/package/symbology-1.18.0

## Dependencies (7)

- [nan](https://npm.io/package/nan.md) ^2.14.0
- [pngjs](https://npm.io/package/pngjs.md) 3.3.0
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.0
- [git-clone](https://npm.io/package/git-clone.md) ^0.1.0
- [pngjs-image](https://npm.io/package/pngjs-image.md) ^0.11.6
- [node-pre-gyp](https://npm.io/package/node-pre-gyp.md) ^0.14.0
- [replace-in-file](https://npm.io/package/replace-in-file.md) ^4.2.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.18.0 (latest) — 2020-06-30

## README

<p align="center">
  <a href="https://symbology.dev"><img src="https://raw.githubusercontent.com/jshor/symbology/master/docs/.vuepress/public/assets/symbology-logo.svg?sanitize=true" alt="Symbology Logo" width="500"></a>
</p>

<p align="center">A Node.js module that generates barcode images. Supports 50+ different 1D or 2D symbologies in png, eps, or svg formats.</p>

<p align="center">
  <a href="https://coveralls.io/github/jshor/symbology?branch=master">
    <img src="https://img.shields.io/coveralls/github/jshor/symbology?style=for-the-badge"
      alt="Code coverage">
  </a>

  <a href="https://travis-ci.org/jshor/symbology?branch=master">
    <img src="https://img.shields.io/travis/com/jshor/symbology/master?logo=travis&style=for-the-badge"
      alt="Build status: Travis">
  </a>

  <a href="https://ci.appveyor.com/project/jshor/symbology?branch=master">
    <img src="https://img.shields.io/appveyor/ci/jshor/symbology/master?logo=appveyor&style=for-the-badge"
      alt="Build status: AppVeyor">
  </a>
</p>

## 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 comprehensive docs →](https://symbology.dev)

## Quick start

```sh
yarn add symbology
```

## Quick Examples

### Code 11 Example

```js
const symbology = require('symbology')

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

This will log:

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

And the base64 PNG generated will look like:

![code 11](https://symbology.dev/assets/barcodes/barcode_14.png)

### MaxiCode Example

```js
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](https://symbology.dev/assets/barcodes/barcode_47.png)

### USPS Example

```js
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](https://symbology.dev/assets/barcodes/barcode_42.png)

## License

[GPL-3](LICENSE.md).

---
_Source: https://npm.io/package/symbology-1.18.0 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
