I'm trying to print a code39 with a labeler (argox x-2300e) so the code is this (i deleted all the stuff to print just a barcode to test):
Imports System.ComponentModel
Imports System.Drawing.Printing
Public Class Form1
Dim linea1 As String = "*A0-121244$K0001196AA-UK*"
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim psz2 As New Printing.PaperSize
psz2.RawKind = Printing.PaperKind.Custom
psz2.Width = 217
psz2.Height = 314
PrintDocument2.DefaultPageSettings.PaperSize = psz2
PrintDocument2.DefaultPageSettings.Margins = New Margins(0, 0, 0, 0)
PrintDocument2.DefaultPageSettings.Landscape = False
PrintDocument2.PrinterSettings.Copies = 1
PrintDocument2.PrinterSettings.PrinterName = "\\ETIC1\Argox X-2300E series PPLB"
PrintPreviewDialog2.Size = New System.Drawing.Size(500, 750)
PrintPreviewDialog2.ShowDialog()
End Sub
Private Sub PrintDocument2_PrintPage(sender As Object, e As PrintPageEventArgs) Handles PrintDocument2.PrintPage
Dim drawFormat As New StringFormat
drawFormat.Alignment = StringAlignment.Center
e.Graphics.ScaleTransform(1, 3)
e.Graphics.DrawString(linea1, New Font("IDAHC39M Code 39 Barcode", 6, FontStyle.Regular), Brushes.Black, New Rectangle(0, 2, 217, 50), drawFormat)
e.Graphics.DrawString(linea1, New Font("Free 3 of 9", 14, FontStyle.Regular), Brushes.Black, New Rectangle(0, 55, 217, 50), drawFormat)
e.Graphics.ScaleTransform(1, 1 / 3)
e.Graphics.DrawLine(New Pen(Brushes.Black, 0.5), New Point(15, 250), New Point(202, 250))
End Sub
Private Sub PrintPreviewDialog2_Closing(sender As Object, e As CancelEventArgs) Handles PrintPreviewDialog2.Closing
Application.Exit()
End Sub
End Class
now, the problem is this:
I print the label but our scanner fails to read the barcode (the scanner is the same of our biggest costumer)
Using the "free 3 to 9" font at size 16 is the minimum size for the code to be readable every time, but this exceeds the dimensions of the label.
Using the "IDAHC39M Code 39 Barcode" font, it must be at least at size 8 to be readable. (but this still exceeds the dimensions of the label)
I draw a line under the 2 code it represent the width of the same bar code generated using the labeler software that came with printer itself, and even though it is smaller, it is fully readable the label is 55mm x 80mm
How can i get the code inside the label be readable? What am I missing?