【问题标题】:Zebra Printer: System.Runtime.InteropServices.COMException (0x8004FFFF)Zebra 打印机:System.Runtime.InteropServices.COMException (0x8004FFFF)
【发布时间】:2018-06-21 13:59:13
【问题描述】:

我们使用以下代码打印到卡片上。

byte[] image;

ZXPPRINTERLib.Job job = new ZXPPRINTERLib.Job();
job.JobControl.Destination = DestinationTypeEnum.Eject;

using (ZMotifGraphics graphics = new ZMotifGraphics())
{
    graphics.InitGraphics(0, 0, ZMotifGraphics.ImageOrientationEnum.Landscape, ZMotifGraphics.RibbonTypeEnum.MonoK);
    graphics.ColorProfile = string.Empty;
    graphics.DrawTextString(...);

    int imageSize;
    image = graphics.CreateBitmap(out imageSize);
}

int actionId;
job.BuildGraphicsLayers(SideEnum.Front, PrintTypeEnum.MonoK, GraphicTypeEnum.BMP, image);
job.PrintGraphicsLayers(1, out actionId);

它可以在我们的开发机器上运行,但是当我们转移到另一个测试环境时,我们会收到以下错误:

System.Runtime.InteropServices.COMException (0x8004FFFF): PrintGraphicsLayers Failed (65535) - Image processing error.
    at ZXPPRINTERLib.IJob.PrintGraphicsLayers(Int32 copies, Int32& actionID)

【问题讨论】:

  • 公司的支持论坛有一篇关于它的文章。谈论 zxp3raster.dll 是错误的位数,典型的部署问题。寻求帮助的最佳场所。 developer.zebra.com/thread/34951

标签: c# zebra-printers comobject interopservices


【解决方案1】:

看来问题是由ZXPPrinter.dll 的注册方式引起的。

正如 Hans 在此 thread 中指出的那样,在注册 dll 的 32 位和 64 位版本时,使用 ZXP3Raster.dll 的文件夹会在 C:\ProgramData\ZXP Series Card Printer SDK\ 下创建一堆文本文件。

注册两个版本的 dll,将导致第一个被覆盖。

此外,我的 C# 项目的构建 Platform Target 被设置为构建为 Any CPU。该项目最终作为 64 位应用程序运行,同时引用 32 位 ZXPPrinter.dll。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-20
    • 1970-01-01
    • 1970-01-01
    • 2016-01-15
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 2019-12-02
    相关资源
    最近更新 更多