I am writing a small application that prints some stickers to a special printer.
When I use MS Word to print some text to that printer (and to an XPS file), the result looks excellent. When I print from C# code with the Graphics object, the text appears to be over-pixelized or over-smoothed.
I tried the following hints, but none produced the same result as MS Word:
System.Drawing.Drawing2D.SmoothingMode.AntiAlias
System.Drawing.Text.TextRenderingHint.AntiAliasGridFit
System.Drawing.Text.TextRenderingHint.AntiAlias
System.Drawing.Text.TextRenderingHint.ClearTypeGridFit
InterpolationMode.NearestNeighbor
CompositingQuality.HighQuality
And some others.
Can you advice which hints are applied by MS Word, so I could create it programatically?
I'm not familiar with the Graphics
object, but I'm guessing you're sending a bitmap to the printer instead of text or vector graphics.
If so, increase the resolution/DPI of the image you're creating to approach that of the printer, or switch to a rich text (XPS) or vector-based format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With