Hi all,
I hope somebody can help. TextRenderingHint.SingleBitPerPixel is apparently not turning off antialiasing when printing a barcode from .net.
Here's a snippet of the code that actually renders the barcode:
graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixel;
graphics.DrawString(
barCodeText,
humanReadableFont,
Brushes.Black,
currentXPosition,
currentYPosition,
StringFormat.GenericTypographic);
To allow close examination of the output during debugging I'm printing to a .tiff format file through the "Microsoft Office Document Image Writer" printer. When zoomed in on the .tiff the antialiasing is clearly visible as a gray halo around the black barcode bars.
Similarly, when printing to the actual printer (BOCA ticket printer in HP Laser Jet emulation mode) the barcode bleeds/appears bolder than expected.
I know the barcode is syntactically correct because at larger point sizes it scans OK. I also know the printer is capable of printing legible barcodes at least as small as what I'm requesting because in it's native 'FGL' mode it prints legible barcodes even smaller than mine.
The fonts I'm using are "Code 128AB" and "Code 128AB HR" by Elfring Fonts Inc.
thanks
Joachim