Is there an Aztec barcode generator library for JavaScript?
Asked Answered
M

1

9

I'm looking for an open source image generation script for Aztec (2D) barcodes:

Aztec Barcode

I can't seem to find any available scripts out there.

There is an Active-X control here that can be used only in IE and an image generator URL here, but these are not useful as it should be a pure javascript solution running under webkit-based browsers that can run in disconnected mode for mobile apps.

Anyone have some old code for this hanging around either written in javascript or that can be ported to javascript?

Thanks.

Maquis answered 8/3, 2012 at 15:46 Comment(0)
A
9

bwip-js runs in any browser that supports <canvas> – IE 9+, FF 2+, Chrome, Safari 3+, Opera 9+, and Android 2.1+. It also runs server-side in Node. (If you wanted downlevel IE support, try using a <canvas> emulation layer.)

Aztec is among the 83 barcode formats it can draw. Here's a demo of it in action.

Alburga answered 8/3, 2012 at 16:30 Comment(9)
It seems to work for server side JS (node) but does it work for client side JS?Trimeter
Yes, any browser that supports <canvas> works. See demo.html in the download ZIP.Alburga
I see an POST request to the server in FireBug and a hard result to an image on the server...Trimeter
You clicked this link, which is a demo of the PostScript implementation that bwip-js is based on. Download the bwip-js ZIP and look at demo.html in that file.Alburga
I tried it already, there are errors everywhere (FF 10 on WIN 7).Trimeter
Works fine for me on Win 7 with Chrome 18, FF 10, and IE 9. (Perhaps an issue with running the file from disk (file:///...) instead of over http?)Alburga
...threw it up as a JSFiddle, see if that works for you.Alburga
It works! Great library by the way! Is it yours? I'm currently working on some canvas image merging stuff...Trimeter
Nope. Just a cool (and completely unnoticed) library I found.Alburga

© 2022 - 2024 — McMap. All rights reserved.