vb.net - Dymo SDK 在运行时出了什么问题
问题描述
我对 Dymo 的 SDK 有疑问。回到基本,我做了一个终极简单的程序和标签。我仍然遇到同样的问题。如果需要,我还尝试了不同的 PC、不同的标签(甚至是带有 1 行文本的标签)等。
Imports DymoSDK.Implementations
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim dymoSDKLabel As DymoSDK.Implementations.DymoLabel
Dim SelectedPrinter As String = "DYMO LabelWriter 450 Turbo"
Dim copies As Integer = 1
Dim barcodeGraphsQuality As Boolean = True
dymoSDKLabel = New DymoLabel()
dymoSDKLabel.LoadLabelFromFilePath("D:\sam\MotorAssembly_Verp_Individueel-70W Extra label.label")
DymoPrinter.Instance.PrintLabel(dymoSDKLabel, SelectedPrinter, copies, barcodeGraphsQuality)
End Sub
End Class
会发生什么:在调试过程中它运行完美,打印没有任何问题。在运行期间,它会给出以下错误(在同一台 PC 上!):错误:标签文件无效:未声明 Element DieCutLabel。
当然我检查了这个元素是否在标签文件中,它是..它是由Dymo软件制作的主要元素............。
所有 Dll 文件等都包含在安装包中..
有人知道吗?
解决方案
我遇到了同样的问题——结果证明我的<PaperName>
XML 标签不是有效的“论文名称”。<Id>
标签和<PaperName>
标签也必须以某种方式匹配。
所有标签在打印之前都根据标签 XML 模式进行了验证,但是该模式似乎是一个没有文档的黑盒子,所以祝你设计好运。
我是如何解决这个问题的?我只是使用此处<PaperName>
示例中的标签并使用标签手动设置标签大小。效果很好!<DrawCommands>
<?xml version="1.0" encoding="utf-8"?>
<DieCutLabel Version="8.0" Units="twips">
<PaperOrientation>Landscape</PaperOrientation>
<Id>Address</Id>
<PaperName>30252 Address</PaperName>\
<DrawCommands>
<!--Width and height are in twips; 1440=1". So this is a 1" square label (30332) and not the 30252 address-->
<RoundRectangle X="0" Y="0" Width="1440" Height="1440" Rx="270" Ry="270" />
</DrawCommands>
<ObjectInfo>
<!--Your label element-->
</ObjectInfo>
</DieCutLabel>
推荐阅读
- c++ - 实现伸展树
- javascript - 如何从javascript比较两个内部对象数组
- c# - 如何在澳大利亚工资单 API (PayrollAUApi) 中推送员工数据?- 施乐
- angular - Angular 表单无法通过动态角度表单更新验证
- python-3.x - 在python中使用列表数据时如何绘制3D图形
- amazon-ec2 - 如果机器停机,不要在特定时间(维护窗口)使用 prometheus/alertmanager 发出警报
- flutter - 在我的肘部发出变化状态不会为我的听众产生事件
- verification - Specman:如何将列表约束为变量的所有迭代,但不仅仅是?
- docker - 我应该如何配置 Vault 服务器配置文件以使其响应所需的标头
- php - 如何将 android 应用程序连接到托管在 myasp.net 服务器上的 Mysql 数据库?