Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/422.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Electronjs多重打印_Javascript_Windows_Printing_Electron_Ipc - Fatal编程技术网

Javascript Electronjs多重打印

Javascript Electronjs多重打印,javascript,windows,printing,electron,ipc,Javascript,Windows,Printing,Electron,Ipc,我有一个web应用程序,我需要在下订单时使用ElectronJS桌面应用程序从桌面打印输出 但我有3台打印机和3个部分需要订购 样本: 裤子部, 袜子组, T恤衫区 当我收到这样的订单:2条裤子,3只袜子,1件T恤 我需要打印3订单发票自己的部分打印机 当我尝试此操作时,只得到1个打印输出的第一个订单部分: _.forEach(printList, (printer)=>{ let deviceName = printer.name; win

我有一个web应用程序,我需要在下订单时使用ElectronJS桌面应用程序从桌面打印输出

但我有3台打印机和3个部分需要订购

样本:

裤子部, 袜子组, T恤衫区

当我收到这样的订单:2条裤子,3只袜子,1件T恤

我需要打印3订单发票自己的部分打印机

当我尝试此操作时,只得到1个打印输出的第一个订单部分:

_.forEach(printList, (printer)=>{
            let deviceName = printer.name;
            win.webContents.print(
                {
                    deviceName: deviceName,
                    silent: true,
                    printBackground: true,
                },
                (success, error) => {
                    if (success) {
                        resolve(true);
                    } else {
                        reject(true);
                    }
                }
            );
        });
我需要多个打印机应用程序与electronjs的桌面