POS For .NET:无法设置 PosPrinter 的属性
我无法设置 PosPritnter 类的属性。例如 PageModeStation、PageModeVerticalPosition、PageModePrintArea 等。
PosPrinter posPrinter = (PosPrinter)posExplorer.CreateInstance(posPrinterInfo);
posPrinter.Open();
posPrinter.Claim(1000);
posPrinter.DeviceEnabled = true;
posPrinter.PageModeVerticalPosition = 10; //<--- Exception thrown: Failed to set property PageModeVerticalPosition
异常详细信息:
Microsoft.PointOfService.PosControlException was unhandled
Message="Failed to set property PageModeVerticalPosition."
Source="Microsoft.PointOfService"
ErrorCodeExtended=0
StackTrace:
at Microsoft.PointOfService.Legacy.LegacyProxy.SetProperty(String propertyName, Object propertyValue)
at Microsoft.PointOfService.Legacy.LegacyPosPrinter.set_PageModeVerticalPosition(Int32 value)
....
有什么建议吗?
I can't set properties of PosPritnter class. For example PageModeStation, PageModeVerticalPosition, PageModePrintArea etc.
PosPrinter posPrinter = (PosPrinter)posExplorer.CreateInstance(posPrinterInfo);
posPrinter.Open();
posPrinter.Claim(1000);
posPrinter.DeviceEnabled = true;
posPrinter.PageModeVerticalPosition = 10; //<--- Exception thrown: Failed to set property PageModeVerticalPosition
Exception details:
Microsoft.PointOfService.PosControlException was unhandled
Message="Failed to set property PageModeVerticalPosition."
Source="Microsoft.PointOfService"
ErrorCodeExtended=0
StackTrace:
at Microsoft.PointOfService.Legacy.LegacyProxy.SetProperty(String propertyName, Object propertyValue)
at Microsoft.PointOfService.Legacy.LegacyPosPrinter.set_PageModeVerticalPosition(Int32 value)
....
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设打印机支持它,您可能需要:
1 - 启用页面模式
2 - 定义打印区域。
在尝试设置该属性之前。
Assuming the printer supports it, you probably need to:
1 - Enable page mode
2 - Define the print area.
Before attempting to set that property.