GithubHelp home page GithubHelp logo

froatsnook / bardcode Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 8.0 299 KB

Draw 1-D barcodes to Canvases, Paths, and SVGs

Home Page: https://froatsnook.github.io/bardcode/

License: MIT License

JavaScript 97.53% Ruby 2.47%

bardcode's People

Contributors

froatsnook avatar ipsusila avatar wolfgang42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bardcode's Issues

Suggest to add QR Code

Very good JS Lib., especially the support of SVG and Path output, would you add QR Code support?

Publish to NPM?

I see that you've created a release for 2.0.1, but the NPM package is still on 1.0.0.

UPC-A: "Invalid checksum"

I don't know what the difference is exactly, but when I upgrade to 949a463 or beyond, I start getting Error: Invalid checksum. when I try to generate UPC-A barcodes. I don't immediately see an glaring problem, but that commit is very large so it wouldn't necessarily be obvious.

Example that this is broken with:

bardcode.drawBarcode('svg', '846823000342', {
	type: 'UPC-A',
	hasChecksum: true,
	horizontalAlign: "center",
	height: 90/3,
	maxWidth: 90 * 1.7,
})

Adding function code

Hello,

How do you guys add Function code (ie FNC1) ?

My scanner always fails because of a missing function code FNC1 after the STARTC.
I am using CODE128 by the way.

Sample options:

const barSvg = bardcode.drawBarcode('svg', '(00)12345678901234567890',
    {
        width: 250,
        height: 95,
        horizontalAlign: 'center',
        verticalAlign: 'middle',
        moduleWidth: 7
    });
const barcodePath = srtps.rectsToPath(barSvg);

Actual results from the scanner:
STARTC0012345678901234567890

Expected results:
STARTCFNC10012345678901234567890

How to resolve this ?

Thank you very much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.