How To Print Barcode Number And Image With C#? Follow

0
Avatar
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 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

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"; 

Please sign in to leave a comment.