Skip to content

pirumpi/boardingbarcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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);
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published