How to handle Zebra printers and labels with C #?

0

I'm doing a Windows Forms application with C #, but I had a problem, in the application you need to print labels with Zebra brand printers, but I do not understand you very well, what I mean is. If you can manipulate the label from the application by giving it the data that I need ?, that is, the data is chosen by the user and it is printed and the label comes out, someone can guide me.

    
asked by Macx 18.10.2018 в 00:46
source

1 answer

1

You can use the class PrintDocument with this you can send text defining the position where you want to print it, you will not have a designer where to define the label but you can send the text to print.

Maybe you should work more on trial and error, but for that there are virtual printers in pdf, when you see that this is correct to print on the physical printer

Overview of the PrintDocument component (Windows Forms) Forms)

you basically define the lines

PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
pd.Print();

and then in the event you use the DrawString () indicating the position of the text on the page

private void pd_PrintPage(object sender, PrintPageEventArgs ev)
{
  //resto codigo
  ev.Graphics.DrawString(line, printFont, Brushes.Black,
           leftMargin, yPos, new StringFormat());

}

here the simplify analyzes the complete code of the article

    
answered by 18.10.2018 / 07:31
source