bwipp / postscriptbarcode

Barcode Writer in Pure PostScript
https://bwipp.terryburton.co.uk
MIT License
464 stars 65 forks source link

Data Matrix - selectable encoding #41

Open ken-sands opened 9 years ago

ken-sands commented 9 years ago

There are cases where selecting a fixed encoding method is preferable over automatic selection for minimum barcode size. (some systems are fixed to read only certain types)

I'd suggest reintroducing the "encoding=???" options so the default can be overridden.

terryburton commented 9 years ago

Plan is to create a dedicated encoder for the Royal Mail Mailmark application of non-standard DataMatrix which mandates the use of C40 encoding except for the customer detail field where a latch to any other encoding can be used. Too specific a specialisation to pollute the datamatrix encoder with this.

Requires introducing a raw mode to the datamatrix encoder so that the encoded codewords can be passed directly.

ken-sands commented 9 years ago

For anyone in need of enforcing a c40 encoding before that is done, the earlier version here https://github.com/bwipp/postscriptbarcode/blob/5dfc33e823c582a1ffa47e9d6c768095c637203e/src/datamatrix.ps allows passing the encoding=c40 flag, which will give you a compliant barcode (if not one that allows the freedom of any encoding for the last bit).

luxlux commented 8 years ago

Is there a way to use a base256 encoding, which is used by Deutsche Post?

When I try libdmtx with the -e8 option for base256, the resulting Data Matrix code is 100% the same as the matrix code generated by Deutsche Post. So it looks like they use a pure base256 encoding, for their completely HEX encoded stamps. Unfortunately libdmtx does not help me, because i need to do it in javascript for a chrome app...

andreygursky commented 8 years ago

To have a control over encoding would be a good feature (e.g., auto, ascii, text, base256,..).

terryburton commented 8 years ago

Coming, but stuck behind some tricky rendering enhancements...

terryburton commented 5 years ago

Option added to support Royal Mail Mailmark encoding requirements.