如何在电子上启用打印预览

问题描述

我用的是electron中的print功能,jQPrint插件是用来打印指定内容的。但是打印前无法进行打印预览。只出现打印设置的窗口。 enter image description here 点击打印按钮后的代码

  var display = $("#container").css("display");
  if (display == "block") {

    var img=new Image();
    img.src=imgSrc;

    img.onload=function(){
      setTimeout(function () {
        $(img).jqprint({
          debug: false,importCSS: true,printContainer: true,operaSupport: false,});
      },500);
    }

  }

});

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)