boardingbarcode

2.0.2 • Public • Published

boardingbarcode

Generate an SVG boarding pass barcode using Nodejs.

Example

const barcode = require('boardingbarcode');
 
//Generate barcode
/**
 * boardingType: 0 AZTEC or 1 PDF417
 * boardingPassSize: 0-100
 * text: Boarding pass text config
 */
//barcode(boardingType, text, errorCorrection, boardingPassSize)
barcode(1, 6, {
    firstName: 'Carlos',
    lastName: 'Martin',
    PNR: 'XYZ123',
    from: 'HNL',
    to: 'LAX',
    flightOperator: 'HA',
    flightNumber: '123',
    date: '10/30/2017',
    class: 'F0', //FirstClass
    seat: '35A',
    boardingIndex: '0001'  
}).then(svg => {
    console.log(svg);
});

Readme

Keywords

Package Sidebar

Install

npm i boardingbarcode

Weekly Downloads

1

Version

2.0.2

License

ISC

Unpacked Size

1.2 MB

Total Files

5

Last publish

Collaborators

  • pirumpi