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 ?

  • Replied 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.

     
      <SPAN class=kwd>Dim WithEvents</SPAN> pd <SPAN class=kwd>As New</SPAN> System.Drawing.Printing.PrintDocument

    <SPAN class=kwd>Private Sub</SPAN> Button1_Click(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> System.EventArgs) <SPAN class=kwd>Handles</SPAN> Button1.Click
    pd.Print()
    <SPAN class=kwd>End Sub

    Private Sub</SPAN> pd_PrintPage(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> System.Drawing.Printing.PrintPageEventArgs) <SPAN class=kwd>Handles</SPAN> pd.PrintPage
    e.Graphics.DrawString(<SPAN class=st>"Test Page"</SPAN>, <SPAN class=kwd>New</SPAN> Font(<SPAN class=st>"Arial"</SPAN>, 10), Brushes.Black, 10, 10)
    <SPAN class=kwd>End Sub</SPAN>
     
  • Replied 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.

  • Replied 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 ?


     

Need extra support?

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

Learn More

Forum Channels