mycurelabs / vue-html-to-paper

Vue mixin for paper printing html elements.
MIT License
298 stars 101 forks source link

On cancel or close the main window opened where a print button is embedded closes too! how do i only close the print and preview and not my main tab? #97

Closed jovi09 closed 1 year ago

MixinsSmartSystem commented 2 years ago

@ open the index.js for VueHtmlToPaper by click on . after the line 76 add this line win.close()

syx-pravin commented 2 years ago

To stay on your main tab and to close only print dialogue, you need to do the following changes.

open index.js and search for the line

setTimeout(function () {window.close();}, 1); cb(); }, 1000);

and replace this code with

setTimeout(function () {}, 1); cb(); }, 1000);

Now add win.close(); after win.print(); statement.

rayamjad commented 1 year ago

Just replace setTimeout(function () {window.close();}, 1); cb(); }, 1000);

with

setTimeout(function () {win.close();}, 1); cb(); }, 1000);