rkone / sharpzebra

A .net library that simplifies printing to Zebra printers in their native EPL2/ZPL languages without needing to know EPL2 or ZPL.
MIT License
91 stars 34 forks source link

Minor bug or working as designed? #4

Closed anubi closed 6 years ago

anubi commented 6 years ago

If you call ZPLCommands.CustomStringWrite() before you call ClearPrinter(), PrinterSettings will always be null and CustomStringWrite will fail! Should CustomString's constructor not create an empty PrinterSettings when instantiated? Or is it intended you must always call ClearPrinter() before doing any work?

I'm using the library just for generating ZPL-compliant text from an image, so settings don't apply for me necessarily.

rkone commented 6 years ago

Well, it's outside the intended use at least. I can make it friendlier to use.

rkone commented 6 years ago

CustomStringWrite now contains an additional parameter - ramDrive. This will default to R (and not crash) if left blank. Specifying PrinterSettings is no longer necessary (but will still be used if specified).