0

TDymoDrucker在 Delphi 中使用类来打印标签。我使用 Dymo Label v.8 创建了标准标签字段。

在 Labelform 中,我通过单击按钮将变量发送到 TDymo Drucker 类

procedure TFormButton.Button1Click(Sender: TObject);
var
  Print : TDymoData; 
begin
  PrintData.selected     := 'Button1';
  PrintData.Nummber      := 1234;
  PrintData.Name :='Example1';
  DymoData.Print(PrintData); //Passing parameters to Dymodrucker classwhere it checks for printer status and label fields
end;

我处理所有操作以检查是否安装在 DymoDrucker 类中的所有字段和驱动程序,最后使用DymoAddIn.Print(1, true)我能够打印标签。

但是单击相同形式的另一个按钮

procedure TFormButton.Button2Click(Sender: TObject);
var
  Print : TDymoData; 
begin
  PrintData.selected     := 'Button2';
  PrintData.Model      := 4567;
  PrintData.ModelName :='Example2';
  DymoData.Print(PrintData);
end;

我处理所有操作以检查是否安装在 DymoDrucker 类中的所有字段和驱动程序,最后使用DymoAddIn.Print(1, true),我无法打印标签。它不显示任何错误消息或失败。
有人可以告诉我为什么会这样吗?提前感谢您的帮助。

4

1 回答 1

0

它现在可以工作了,我现在使用 DYMO SDK v.8 中的现有示例(在我使用测试之前)创建了一个新标签,并使用地址字段(动态)而不是静态的文本字段(静态)添加了字段。它现在按预期打印。

于 2015-11-04T15:44:11.660 回答