lukevp / ESC-POS-.NET

Efficient, Easy to Use Thermal Printing & POS (Windows/Linux/OSX, WiFi/BT/USB/Ethernet)
MIT License
500 stars 161 forks source link

Adding Encoding property and examples in the README.md #260

Closed igorocampos closed 5 months ago

igorocampos commented 5 months ago

Based on discussions on #256 and #88 I have updated the README.md to show how to print Chinese Characters.

I also added a new property in the Emitter class, so folks can set (and change) their Emitter Encoding at will instead of Encoding all strings before sending to the printer with Write(). This will also enable usage of Print() command from Emitter which contains cross-OS new line treatment (I also revamped it to use Regex instead of 2 Replace Alls).

igorocampos commented 5 months ago

@lukevp as a follow-up to this PR, I think we could have another property on the emitter, called Columns, so people can set the column count they wish to use. Leveraging that, we could have things like a Horizontal full line command, print a table command, and even another command that aligns text to both left and right in the same line (this is especially useful for when dealing with product description and price).

See #210 and #211

lukevp commented 5 months ago

looks good to me, thanks @igorocampos! great work!