i´m trying to print a barcode on a argox os-214 that i create using this framework http://barcoderender.codeplex.com/ but is always blurry, can´t read using a scanner.
I already tried some other solutions, but i still dont get it, and if using the "Bartender" the printer software, work´s just fine. The label size is 40mmX60mm and is set up in windows printing. follow the prototype code:
public MainWindow()
{
InitializeComponent();
Code39BarcodeDraw code39 = BarcodeDrawFactory.Code39WithChecksum;
pcImage.Source = GetImageStream(code39.Draw("1234567", 13));
}
public static BitmapSource GetImageStream(System.Drawing.Image myImage)
{
var bitmap = new Bitmap(myImage);
IntPtr bmpPt = bitmap.GetHbitmap();
BitmapSource bitmapSource =
System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
bmpPt,
IntPtr.Zero,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
bitmapSource.Freeze();
return bitmapSource;
}
private void btnPrint_Click(object sender, RoutedEventArgs e)
{
PrintDialog dlg = new PrintDialog();
bool? result = dlg.ShowDialog();
if (result.HasValue && result.Value) {
pcImage.Measure(new System.Windows.Size(dlg.PrintableAreaWidth, dlg.PrintableAreaHeight));
pcImage.Arrange(new Rect(new System.Windows.Point(0, 0), pcImage.DesiredSize));
dlg.PrintVisual(pcImage, "Print a Large Image");
}
}
}
This is just a image component... Well, any help would be appreciate. Thanks in advance. The printer have 203dpi, and it´s wpf. Label with the blurry code