-
Notifications
You must be signed in to change notification settings - Fork 309
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
Code 128 internal error when unused ^NNN under some conditions #176
Comments
@terryburton: The error is occurring in the postscript code. The code does a
That
I tested that on my version of |
True, but if we are accepting of I would certainly be better to throw a specific BWIPP error rather than fail in the PostScript. Perhaps something like this?
I hope to add support for ECI at some point in the future as I'm currently helping to revise the ISO standard and things will hopefully be more workable in future. At that point well need to introduce support for six-digit function character, e.g. Also we need to support GS1 data containing |
That seems reasonable. And gives the caller an idea of what they did wrong. @semireg: The reason your input is incorrect is when the |
I've pushed a commit for parsefnc error reporting and ECI parsing (but not encoding yet). I'll give it a while before tagging it as a release. |
@terryburton Hello! I get this mistake for barcode 'фывфыафыаф' bwipjs.toCanvas( TypeError: Cannot read properties of null (reading 'pixels') |
The built-in fonts with bwip-js include mostly 7-bit ascii characters, with a small subset of iso-8859-1 8-bit chars. You will need to load a custom font to render your text correctly. |
@metafloor Thank you. bwipjs.loadFont('arial', 100, arialNormalFont) I am getting the same error. |
Wow. Really old bug that was never handled correctly in the 2.0 release. Postscript works in UTF-8 and the bwip-js code never mapped from UTF-8 to UTF-16 (actualy UCS-2 since surrogates are not supported) when rendering the glyphs. Here is the picture you were probably hoping for: I have some additional work to do with this bug, so look for a release this weekend. BTW, I am assuming you have a scanner configured to read UTF-8? Can you please verify the barcode in the image is decoding correctly. Thanks. |
Thanks a lot. I will wait. |
Forgot to post this. v3.0.5 is on npm/github with the updated code. |
There seems to be an issue when unrecognized (unparsed?)
^NNN
are encountered, but not "enabled" via parse option(s). This should probably fail gracefully by just rendering the^NNN
. I wrote "options" plural because I thought I could trigger this error with a different combination of parse/parsefnc... but looks like this is all I can reproduce for now.Image from demo.
The text was updated successfully, but these errors were encountered: