How To Print Barcode Number And Image With C#? 追蹤

Legacy Poster

Hi, i am writing a c# program and my program generates barcode number and image of barcode but i cant print barcode datas with this code. 

I create btw file and i can open print dialog with my btw settings but i cant send any data to it. Is there anyone who has done it before?

1 意見

Ian Cummings
評論操作 永久連結

In your label design set a name to each data source that you wish to set externally, and then from your application code you can make reference to these exposed named data source values.


Engine btEngine = new Engine(); 
LabelFormatDocument btFormat = btEngine.Documents.Open(@"c:\MyLabel.btw");

btFormat.SubStrings["Address"].Value = "1313 Mockingbird Lane, Anywhere, USA"; 
btFormat.SubStrings["Name"].Value = "John Doe"; 
btFormat.SubStrings["Quantity"].Value = "10";