vectorlin

请问, electron 如何做到可以实时监控打印机的打印状态,比如打印中,打印成功、失败这类状态?

  •  
  •   vectorlin · Nov 22, 2019 · 3863 views
    This topic created in 2367 days ago, the information mentioned may be changed or developed.

    https://electronjs.org/docs/api/web-contents#contentsgetprinters 从文档看到的就只有这个了:

    callback Function (可选)

    success Boolean - Indicates success of the print call. failureReason String - Called back if the print fails; can be cancelled or failed.

    经过测试,这个回调只能判断打印任务是否发出了,并不能判断打印成功或者失败。 所以,有其他办法么,不会真的要写 C++或者 C#才能解决吧?!我只是一个前端 er 啊~~~~

    1 replies    2019-11-22 15:38:21 +08:00
    onice
        1
    onice  
       Nov 22, 2019
    路过,难道打印机状态不该由打印机发出你接收么。单向的情况下,只能判断是否调用了打印机。打印成功失败只有打印机才知道。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2969 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:37 · PVG 17:37 · LAX 02:37 · JFK 05:37
    ♥ Do have faith in what you're doing.