日期:2014-05-18  浏览次数:21277 次

调用BarTender打印条码的问题
大家好,用下面代码打印条码时,条码打印机没有反应,但也没有错误回报,哪里有问题?


  btFormat = btApp.Formats.Open(@"d:\test.btw", false, "");

  btFormat.PrintSetup.IdenticalCopiesOfLabel = 1;
  btFormat.PrintSetup.NumberSerializedLabels = 1;

  /*
  btFormat.SetNamedSubStringValue("Name", "123");
  btFormat.SetNamedSubStringValue("Code", "ZB1000 12345678");
  btFormat.PrintOut(false, false);
  */

  btFormat.SetAvailableTemplateFieldNames("Name", "123");
  btFormat.SetAvailableTemplateFieldNames("Code", "ZB1000 12345678");
  btFormat.PrintOut(false,true);

------解决方案--------------------
干嘛不直接用打印机驱动,直接打印条码呀!
条码打印参考:http://wenku.it168.com/d_000003218.shtml