Spread does not print with Thermal Printer

Posted by: wise-m on 8 September 2017, 3:14 am EST

  • Posted 8 September 2017, 3:14 am EST

    I am using,

     - Microsoft Visual C# 2005 with Windows XP-Pro

     - Spread for Windows Forms v2.0

     - Printer : Zebra Z4Mplus Thermal Printer

    And, installed Zebra's window printer driver in my PC.

    The printer working well with MS-Excel, PowerPoint, Notepad, etc.

    But, does not work anyways in my owned program using Spread.

    Is anyone here to give me a help ?

  • Posted 8 September 2017, 3:14 am EST

    Hello,

    There should be nothing Spread is doing to make this so it will print any differently than your other applications. My guess is that .NET is not able to print to this printer. Try running the following code to print to your Thermal printer using the PrintDocument in .NET.

     
      Dim WithEvents pd As New System.Drawing.Printing.PrintDocument
    

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

    pd.Print()

    End Sub

    Private Sub pd_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pd.PrintPage

    e.Graphics.DrawString(“Test Page”, New Font(“Arial”, 10), Brushes.Black, 10, 10)

    End Sub

     

  • Posted 8 September 2017, 3:14 am EST

    Thanks for your kindness.

    But, my thermal printer does not printing with your sample code.

    I'm sure that my PC sends data to printer.

    Because the printer's data LED is blinking when my PC tries printing.

    How can I do ?

     

  • Posted 8 September 2017, 3:14 am EST

    Hello,

    If the code I sent you did not print anything to the printer, there is nothing in Spread that can be done for printing. This is how printing is implemented in .NET. It sounds like the printer driver does not understand the commands comming from the PrintDocument object in .NET. I would suggest contacting the manufacturs of the print driver to see if they support printing from a .NET application.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels