Hi everybody, I'm evaluating RadBarcode for printing barcodes in thermal printers. My printers have a resolution of 203 dpi in both horizontal and vertical directions. I'm trying to generate an image of the barcode (EAN13) and sending to printer:
public DrawBarcode(Point Location, Size Size, string valor): base(Location)
{
this.Valor = valor;
bc = new RadBarcode();
bc.Value = valor;
var EAN13 = new Telerik.WinControls.UI.Barcode.Symbology.EAN13();
EAN13.ShowText = true;
bc.Symbology = EAN13;
EAN13.Stretch = true;
int n = 50;
while (true)
{
try
{
img = bc.ExportToImage(2*n, n);
this.size = img.Size;
return;
}
catch (Exception) { n += 10; }
}
}
public override void Draw(Graphics g)
{
base.Draw(g);
g.DrawImage(img, 0, 0);
}
I have a base class for controling Drag, zoom and rotation but it is not important in this scenario. When I send the image to screen, text is rendered perfectly but when I send the image to the printer, text is not redeable. Is it any why to specify resolution in ExortToImage or any other why to change generated image resolution?