Barcodes not printing with Dymo SDK & c# .net

1k Views Asked by At

I have a simple label with 2 barcodes on it. I'm able to open the label, and print the label, however the barcodes are not printing. The text labels are.

_label = Framework.Open("c:\\temp\\inventory.label");
_label.SetObjectText("part_num", txtPartNumber.Text);
_label.SetObjectText("serial_num", txtSerialNum.Text);
_label.Print("DYMO LabelWriter 450");
1

There are 1 best solutions below

0
On

I figured it out. Had to use the SDK and not the label framework.

var myDymoAddin = new DymoAddIn();
var myLabel = new DymoLabels();
if (myDymoAddin.Open(@"c:\temp\inventory.label"))
{
   myLabel.SetField("part_num", txtPartNumber.Text);
   myLabel.SetField("serial_num", txtSerialNum.Text);
   myDymoAddin.StartPrintJob();
   myDymoAddin.Print(1, false);
   myDymoAddin.EndPrintJob();
 }