problems printing barcodes

Nov 22, 2011 at 2:40 PM

I was trying to print a bar code (symbology 128) but fails to print.
Could help me with some example?

regards
Cristian

Coordinator
Nov 22, 2011 at 2:52 PM

Are you using the regular library, or the ZPL version?  If it's the regular library, have you tried looking at the sample included with the source?

Does the label print everything except the bar code?  Other elements like text are ok?

 

Nov 22, 2011 at 4:28 PM

 

I'm using the dll http://sharpzebra.codeplex.com/releases/view/6450#DownloadId=17436

The code is as follows :

ZebraCommands commands = new ZebraCommands();

commands.Add (ZebraCommands.BarCodeCommand (0, 1, ElementRotation.NO_ROTATION, 0, 2, 3, 4, true, "abc"));

System.Drawing.Printing.PrinterSettings oPS = new System.Drawing.Printing.PrinterSettings();

 

new ZebraPrinter(oPS.PrinterName).Print(commands);

Coordinator
Nov 22, 2011 at 7:31 PM

Try this for your BarCodeCommand:

commands.Add (ZebraCommands.BarCodeCommand (0, 1, ElementRotation.NO_ROTATION, 1, 2, 3, 40, true, "abc"));

Nov 23, 2011 at 12:28 PM

thank you very much for your help!
Another thing, as could focus or change the position  barcodeData

Coordinator
Nov 23, 2011 at 5:10 PM

Not sure I understand the question.

The command description is BarCodeCommand(x, y, rotation, type, thin bar width, thick bar width, height, show text, data) - the first 3 variables control positioning.