Skip to content
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

Force encoding in dmtx #123

Open
uidzip opened this issue Dec 28, 2024 · 1 comment
Open

Force encoding in dmtx #123

uidzip opened this issue Dec 28, 2024 · 1 comment

Comments

@uidzip
Copy link

uidzip commented Dec 28, 2024

Since swapping to dmtx, Barby::DataMatrix.new now autodetects the encoding to use and cannot be overridden. Semacode did not do numeric encoding so this wasn't a problem, but we have mail inserter equipment, 100s of $thousands, that cannot read numeric encoding datamatrix.

I will fork and do a PR unless someone beats me to it, but we need to be able to tell dmtx to use ascii encoding even if the data is numeric, through barby.

@uidzip
Copy link
Author

uidzip commented Dec 28, 2024

That actually isn't the problem, both are using ascii encoding. The more I dig into this the weirder it gets. Semacode used someone else's encoder function which had a one-off bug, and rather than fix it the semacode author just appended a space to the data, artificially increasing the symbol size. It also uses a lookup table to determine symbol size rather than calculate it efficiently the way dmtx does.

What I actually need is a way to force dmtx to artificially use a less efficient symbol size than is required for the data. The inserters will read 18x18 but they will not read 14x14. I don't know why, I didn't build them and I can't force them to support 14x14. So I may have to do a PR on both barby and dmtx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant