Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jshor/symbology
🔖 Generates 1D, 2D, or composite barcodes in png, svg, or eps formats. Supports 50+ symbologies.
https://github.com/jshor/symbology
aztec barcode code-128 data-matrix ean gs1 isbn onecode pdf417 qrcode upc
Last synced: 11 days ago
JSON representation
🔖 Generates 1D, 2D, or composite barcodes in png, svg, or eps formats. Supports 50+ symbologies.
- Host: GitHub
- URL: https://github.com/jshor/symbology
- Owner: jshor
- License: gpl-3.0
- Created: 2015-04-18T14:21:43.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-11-26T23:01:57.000Z (12 months ago)
- Last Synced: 2024-10-24T06:41:59.403Z (16 days ago)
- Topics: aztec, barcode, code-128, data-matrix, ean, gs1, isbn, onecode, pdf417, qrcode, upc
- Language: TypeScript
- Homepage: https://symbology.dev
- Size: 5.55 MB
- Stars: 219
- Watchers: 3
- Forks: 24
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome - jshor/symbology - 🔖 Generates 1D, 2D, or composite barcodes in png, svg, or eps formats. Supports 50+ symbologies. (TypeScript)
README
Symbology
A Node.js module that generates barcode images. Supports 50+ different 1D or 2D symbologies in png, eps, or svg formats.
## 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 →](https://symbology.dev/docs/)
## Quick start
```sh
yarn add symbology
```## Quick Examples
### Code 11 Example
```ts
import { SymbologyType, createStream } from 'symbology'(async () => {
const { data } = await createStream({
symbology: SymbologyType.CODE11
}, '8765432164')console.log('Result: ', data)
})()
```This will log:
```json
{
"data": "data:image/png+data;base64,PHN [...] eFd==",
"message": "Symbology successfully created.",
"code": 0
}
```And the base64 PNG generated will look like:
![code 11](https://symbology.dev/assets/barcodes/barcode_14.png)
### MaxiCode Example
```ts
import { SymbologyType, createFile } from 'symbology'(async () => {
const { data } = await createFile({
symbology: SymbologyType.MAXICODE,
option1: 2,
primary: '999999999840012',
fileName: 'maxiCodeExample.svg'
}, 'Secondary Message Here')console.log('Result: ', data)
})()
```This creates `maxiCodeExample.svg` which looks like:
![MaxiCode](https://symbology.dev/assets/barcodes/barcode_47.png)
### USPS Example
```ts
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](https://symbology.dev/assets/barcodes/barcode_42.png)
## License
[GPL-3](LICENSE.md).