【问题标题】:what goes wrong with Dymo SDK at runtimeDymo SDK 在运行时出了什么问题
【发布时间】:2021-07-15 13:56:13
【问题描述】:

我对 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 文件等都包含在安装包中..

有人知道吗?

【问题讨论】:

  • 我遇到了同样的问题。将其缩小为 两个元素之一。 LargeAddress30321 Large Address 有效,但:MultiPurpose1135511355 Multi-Purpose 无效。你查到真相了吗?

标签: vb.net sdk dymo


【解决方案1】:

我遇到了同样的问题 - 结果是我的 <PaperName> XML 标签不是有效的“论文名称”。 <Id> 标签和 <PaperName> 标签也必须以某种方式匹配。

所有标签在打印之前都会根据标签 XML 架构进行验证,但该架构似乎是一个没有文档的黑匣子,所以祝你设计好运。

我是如何解决这个问题的?我刚刚使用了示例here 中的<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>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-01
    • 2023-03-15
    • 1970-01-01
    • 2016-01-19
    • 1970-01-01
    • 2012-10-15
    • 2021-06-19
    相关资源
    最近更新 更多