我们使用以下代码打印到卡片。
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)