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.