I am trying to print a receipt on 58mm thermal printing with the use of vb.net and Graphics.DrawString of vb.net but it is leaving some space at the beginning. I have also tried by giving the x coordinates values as 0 and negative, in such cases the first case is either printing half or discarded sometimes.
The code is as below
Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
PrintDialog1.Document = PrintDocument1 'PrintDialog associate with PrintDocument.
If PrintDialog1.ShowDialog() = DialogResult.OK Then
PrintDocument1.Print()
End If
End Sub
Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim printFont = New Font("Calligraphr", 24.8, FontStyle.Regular)
Dim printBold = New Font("Calligraphr", 26, FontStyle.Bold)
e.Graphics.DrawString("C", printFont, Brushes.Black, New Point(0, 50))
e.Graphics.DrawString("I", printFont, Brushes.Black, New Point(-6, 60))
e.Graphics.DrawString("T", printFont, Brushes.Black, New Point(6, 60))
e.Graphics.DrawString("Y", printFont, Brushes.Black, New Point(12, 60))
End Sub