Search code examples
c#printinglabelbarcode-printing

Godex lable printing with c#


I want to printing a label, but i cant. I watched lot of video about this, but i cant find any solution. Here is my code: image I dont know what bool test do, because it never used. (I copied)

Anyone any idea?


Solution

  • Update

    I find a method, and it work.

    I create a label with GoLabel program. Important! Use only built-in text. After you done with the label, click the export button and it create a raw print code.

    In the program repleace the desired text with [printext].Repleace() method. Save the text to a txt file. After, create a cmd string, and use this code:

     strCmdText = @"/C LPR -S " + ip + " -d -P raw toprinter.txt";
    

    ip means the current printer IP address.

    Finally, run it with cmd like this:

     System.Diagnostics.Process.Start("CMD.exe", strCmdText);
    

    When the cmd app just pop up and close, you need to install windows SDK and move these files:

    enter image description here

    to:

    C:\Windows\SysWOW64 
    

    this directory.

    If you done with this, it will print your label.