2

I read the Bartender SDK,and write the follow code to test label template.

var lb = @"C:\Users\Administrator\Desktop\线标.btw";
        using (Engine engine = new Engine(true))
        {
            LabelFormatDocument btformate = engine.Documents.Open(lb);
            btformate.SubStrings["version"].Value = txtVersion.Text;
            btformate.SubStrings["pn"].Value = txtPN.Text;
            btformate.SubStrings["sn"].Value = txtsn.Text;
            btformate.SubStrings["week"].Value = txtWeek.Text;

            btformate.PrinterCodeTemplate.Performance.AllowSerialization = false;
            btformate.ExportImageToClipboard(Seagull.BarTender.Print.ColorDepth.ColorDepth256, new Resolution(200));
            engine.Stop();
        }

In the label template, I use Printer Code Template Field to pass data from c# to Bartender engine.

For example , I set pn = "04130032" and consider that the output will be the right string "04130032",unfortunately, Bartender display another way "4,130,032.00". As you see, it was regarded as number,I really want it to be STRING!!

Bartender template picture

template output picture

Howa can I adjust the label template and find the right way?

Thanks a lot.

stuartd
  • 70,509
  • 14
  • 132
  • 163
wuhen
  • 43
  • 2
  • 5

1 Answers1

0

After trying to recreate your scenario in my Bartender Software, I come out with a few things you can try:

  1. Check if there is any VBScript in the Barcode Human Readable which will translate data to number enter image description here
  2. Try to recreate a new BTW Template
Raynoceros
  • 386
  • 2
  • 15