barnhill / barcode-java Goto Github PK
View Code? Open in Web Editor NEWJava Barcode Image Generation Library
License: MIT License
Java Barcode Image Generation Library
License: MIT License
hello,
Thanks for the library, I'm using it from quite a long time and it works nice!
I was using the 1.x branch and wanted to switch to the latest (2.6.1) but I see the artifacts are hosed since 2.2. I get the error:
The following artifacts could not be resolved: com.pnuema.java:barcode:jar:2.6.1 (absent)
when using the dependency example shown in the README.
If I check on mvnrepository, it's ok in 2.1:
But in 2.2, it's not published the same we see a -jar.jar:
I see a commit mentioning a classifier change which is certainly the -jar is all about.
I did not add the dependency in a fancy way but it does not see to work anymore from 2.2 onwards.
best regards,
--Stef
When creating a EAN13 with standardized label something is broken with the computation of the white boxes and the font heights. Especially is looks like setFont() is never called internally in this code flow and defaults to something
Barcode b = new Barcode();
b.setIncludeLabel(true);
b.setLabelFont(new Font("Monospace", Font.PLAIN, 25));
// EAN13 "standardized label tries to separate the digits and blank out the lower bounds of two
// blocks in the EAN, to look like what we find on some products. however it fails to adjust the font
// size and looks awful
b.setStandardizeLabel(true); //change to false and it looks ok, but not "standardized"
BufferedImage img = (BufferedImage) b.encode(Barcode.TYPE.EAN13, val);
version: 'com.pnuema.java:barcode:1.10'
This code just produces a solid
barcode with no text, it is not teh same as the sample image.
Barcode barcode = new Barcode(); Image img = barcode.encode(BarcodeLib.TYPE.UPCA, "038000356216");
Maven dependency is not available.
com.pnuema.java
barcode
1.1
Dependecy com.pnuema.java.barcode:1.1 not found
The line 914 in barcode.java.
if ((getLabelPosition().ordinal() & Labels.LabelPositions.TOP.ordinal()) > 0)
Labels.LabelPositions.TOP.ordinal() is 0, So it is always 0. Maybe we just check the enum not enum's value.
When generating a pharmacode barcode with the value 3 or 4 or 5 then I only seem to get a solid black box, i.e. a single barcode line that fills the area I specify.
When generating a pharmacode barcode with the value 6, I correctly get a wide bar, space and wide bar, however, generating with 7 or 8 or 9 also gives the same barcode as when using 6 as the value.
10101110111010 in position 8 is incorrect and this corresponds to the value for 0. Move this to the front of the list and it should correct this issue
Does not encode
905216900040000000045771410179249000474750
correctly as a standard C128 barcode. Its starting with the CODE_A char which is incorrect as this is all numeric and should detect that and use CODE_C
Im trying to use the library for get the encoded value for use with a barcode font type.
If I get the encoded value (for example for Code128):
new Code128(value).getEncodedValue()
Im getting a String with a binary content. For example I have this data:
value - expected - encodedValue
0 - Ì01Î - 1101000010010011101100100111011001100011101011
93 -Í}ÃÎ - 1101001110010100011110101111010001100011101011
95 - ÍÃÅÎ - 1101001110010111101000111101010001100011101011
400000 - ÍHÂÂJÎ - 11010011100110001010001101100110011011001100101101110001100011101011
Any way to convert this binary output to a string for use with a barcode font type?
when the barcode is embedded on some background, the scanner gun will need some "peace space" (white border) in order to recognize the barcode regardless of the background. this should be an option to have.
could look like
b.setMargin(10)
or even
b.setMargin(10,10,10,15)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.