- What is Open Barcode?
- Open Barcode is an open-source library for generating linear barcodes. It is available for JavaScript, Python, C#, PHP and Java, and each version is licensed under Apache-2.0.
- Which barcode types are supported?
- UPC-A, EAN-13 and Code 39 are supported in all five languages. 2D barcodes such as QR and Data Matrix are planned, in a separate namespace next to the linear ones.
- Does Open Barcode have dependencies?
- No. Each package uses only its language's standard library at runtime. Test frameworks are used only during development.
- Do the five languages produce the same barcode?
- Yes. Every language is tested against the same known-good module patterns. For example, UPC-A 036000291452 produces the same 95 modules in JavaScript, Python, C#, PHP and Java.
- Does it check the check digit?
- Yes. UPC-A and EAN-13 calculate the check digit when you omit it. When you pass a full code with a check digit, the library verifies it and raises an error if it is wrong.
- Does the library draw the barcode as an image?
- No. It returns the module pattern, a sequence of 1 for a bar and 0 for a space. You render that pattern as SVG, canvas, PNG or print output. The website's generator shows one way to render it as SVG.
- Is it free to use?
- Yes. Open Barcode is licensed under Apache-2.0, which allows commercial use. Keep the license and the copyright notice when you redistribute it.
- Is version 2.0.0 released?
- Not yet. The 2.0.0 release is being prepared. Each repository already declares version 2.0.0, and the status on this website shows when the packages are published.
- Which versions of each language are supported?
- JavaScript needs Node.js 18 or newer, or a modern browser that supports ES modules. Python needs 3.10 or newer. C# targets .NET Standard 2.0 and .NET 8. PHP needs 8.1 or newer. Java compiles to Java 8 bytecode.
- Can I use it in the browser?
- Yes. The JavaScript package is an ES module, so you can import it with a script of type module. The website's live generator is an example of this.