forked from lindell/JsBarcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Node Setup
Bankn8II©$A edited this page May 17, 2025
·
1 revision
JsBarcode for Node.js is dependent on node-canvas to work. It does have some dependencies outside of npm to work. Make sure to install them by following the instructions in their readme.
npm install canvas
npm install jsbarcode
const JsBarcode = require('jsbarcode');
const { Canvas } = require("canvas");
const canvas = new Canvas();
JsBarcode(canvas, "Hello");
// Do what you want with the canvas
// See https://github.com/Automattic/node-canvas for more information