I have some code for printing vouchers, working fine. Problem is it's taking 2/3 seconds to start print, but my customer wants fast print. am showing code, please help
here is my code
Private Sub Btn_Print_Test_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Print_Test.Click
Me.Btn_Print_Test.Enabled = False
Dim document As New PrintDocument
AddHandler document.PrintPage, New PrintPageEventHandler(AddressOf Me.TestPrint_PrintPage)
document.PrintController = New StandardPrintController
document.Print()
Me.Btn_Print_Test.Enabled = True
End Sub
Private Sub TestPrint_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs)
e.Graphics.DrawString("* 012345678987654*", New Font("Free 3 of 9 Extended", 17.0!, FontStyle.Regular), Brushes.Black, CSng(2.0!), CSng(0.0!))
e.Graphics.DrawString("* 012345678987654*", New Font("Free 3 of 9 Extended", 17.0!, FontStyle.Regular), Brushes.Black, CSng(2.0!), CSng(17.5!))
e.Graphics.DrawString(Strings.Space(10) & "* 012345678987654 *", New Font("Courier", 8.0!, FontStyle.Regular), Brushes.Black, CSng(2.0!), CSng(38))
End Sub
What I have tried:
I have searched so many tutorials related printing, but nothing helped me