简体   繁体   English

如何使用离子 Web 应用程序检测与系统连接的打印机

[英]How to detect printer connected with system using ionic web application

We are developing ionic web application with printer functionality.我们正在开发具有打印机功能的 ionic web 应用程序。 We used Print.js npm to print the content.我们使用 Print.js npm 来打印内容。 If in case the printer not connected with system, I need to show some message about this.如果打印机未与系统连接,我需要显示一些关于此的消息。 how can I determine whether the printer is connected or not.如何确定打印机是否已连接。 Is there any way in print.js npm or any other npm to determine this requirment.在 print.js npm 或任何其他 npm 中是否有任何方法来确定此要求。

This is not possible with Javascript alone.单独使用 Javascript 是不可能的。 You would need to use ActiveX or a native application.您需要使用 ActiveX 或本机应用程序。

Ref: https://github.com/crabbly/Print.js/issues/129参考: https : //github.com/crabbly/Print.js/issues/129

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM