Link to home
Start Free TrialLog in
Avatar of photowhiz
photowhizFlag for Canada

asked on

Printing to label printer without dithering.

We're trying to output labels to a Zebra label printer using standard .Net System.Drawing.Printing classes, and it looks like crap. I've seen other label-printing apps output fonts that are are tiny, high-contrast, and readable. Other barcodes are tiny, yet scannable with crisp, sharp bars. Color logos come out in diffusion-dithered black and white.

Trying to draw anything that small in our app is unreadable; even 12-point fonts come out with artifacts all over the place. Barcodes have little halftoning patterns on their edges, and logos look like a 20th-generation photocopy.

I read through some Zebra docs, and they suggest writing raw EPL codes to the printer via serial emulation. We cannot do this, we have to work on whatever Windows printer the customer selects. Is there some way to render to the device resolution, or prevent dithering?
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

I am not a .NET or C# expert but what you describe sounds like just a general fonts issue.  Since you aren't printing to a specific printer (i.e. laser) that has known fonts can you install a font that will work?  Just as part of your application you would install a font (that you legally can) in their Fonts folder.  Your application should then be able to use it and produce what you need, even if they don't use the Zebra printer.

I can suggest some places to get custom fonts or info about programs to make them.  Let me know if you have a question about any of this or tell me how it helps.  I am afraid that the font is the key here to getting the output and it will be very hard to make another work with good results.

bol
ASKER CERTIFIED SOLUTION
Avatar of idautomation
idautomation
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of photowhiz

ASKER

I do not believe this is a font issue; it happens to any font printed on the label printer at a small size. It does not happen sending the same font to a laser printer. Nor am I confident that printing which looks terrible using the high-resolution hinted fonts that come with Windows will look great with fonts I make up myself.

The second reason I don't believe it's a font issue is that I have been able to reproduce it drawing straight lines and rectangles. Depending on my coordinates, the edges of plain black rectangles are all jagged.

I believe it has something to do with a mismatch between the resolution .Net is drawing the graphics at and the printer resolution. Sometimes a plain black rectangle has jagged edges, but drawing the same rectangle a few pixels over has sharp edges. Or perhaps it's trying to anti-alias the rectangle? I don't know.

While I don't want to include my own fonts, thanks for the link idautomation, your FAQ is helpful.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial