-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to specify 128 A? #31
Comments
No. The encoder is optimizing for length and switching codes when appropriate. Code B adds mainly "lowercase" characters and Code C offers possible size reductions by encoding numbers from 00 to 99 in one symbol instead of two. If you restrict your input to symbols that are only in Code A you basically have to calculate the checksum character and are done:
No optimizing and code switching needed.
If you look into If you need further help with this please ask. |
thanks for the quick reply. I think I am getting there. This is for an amazon specific barcode, they say to use code 128A - which to me means the start character is Ë but when they generate the barcode the start character is Ì which is a little confusing. So the code from your encoder app and from amazon both match - but to me they both have the wrong start character if you are told it has to be 128A. I'm guessing it is no big deal - I edited the encode.js file to have all 3 have the same start digit as A but then undid that when I saw that the labels amazon creates match what you have. A service that makes this same barcode looks like it has Ë for its start code which to me is correct. That bar code and the one amazon generates both work, even though the start code is different. To me it looks like what amazon wants you to do 128 Auto which is what it sounds like your encoder is doing. |
I'll leave this open as a feature request for the encoder.
I agree, however, if they accept it it's not too bad.
Maybe they just want to make sure that you encode only uppercase characters. |
I ended up switching to JsBarcode as it allows you to specify 128A. I liked the way the libre font worked though, and would prefer it if there was a way to specify the code type. That said my use case may be a bit weird - a spec to follow where even the spec creator is not following the spec. Good times. Thanks for your work and help. |
Thanks for the feedback! |
In case someone stumbles here for the same reason (third party logistics provider can be awfully annoying in what they require), I needed to have the same feature, so I made it available here: https://www.npmjs.com/package/@juit/librebarcode#encoding-with-a-specific-code-set |
On your encoder here: https://graphicore.github.io/librebarcode/ is it possible to specify to encode the string as 128A?
I see in the encode.js file what looks like different start characters for 128A, B and C but I don't see how to specify which one.
I have a spec that says my barcode should be 128A and I am thinking just encoding like you are and wrapping it in the libracode font is not actually doing that?
I have an example barcode and other than the first few lines mine matches but I think those first few lines are the start character but not specifically 128A.
The text was updated successfully, but these errors were encountered: