Print to Google Cloud Print with dynamic URL

廉价感情. 提交于 2019-12-04 19:51:57

You can open print dialog whenever you want that, just call:

gadget.openPrintDialog()

and that will open printer dialog. So for your case you might want to create print button using static method:

cloudprint.Gadget.createDefaultPrintButton("print_button_container");

then attach custom handlers for the button, and whenever you are ready just call:

var gadget = new cloudprint.Gadget();
gadget.setPrintDocument(...);
gadget.openPrintDialog();

You can call method gadget.setPrintDocument() at any moment, even after the print dialog has been opened.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!