mycurelabs / vue-html-to-paper

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

Errors in console when printing #77

Closed MarioSebastian closed 3 years ago

MarioSebastian commented 3 years ago

Hi all,

I am getting this error everytime the print function is called. A boolean is being passed as a fourth parameter to window.open. This is not used and may cause an exception in a future release

My print function looks as such:

 print() {
    this.$htmlToPaper("barcodes", null, () => {
      console.log("Printing completed or was cancelled!");
    });
},

My configurations look as such:

import VueHtmlToPaper from "vue-html-to-paper";

const options = {
  name: "_blank",
  styles: [
    "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css",
    "https://unpkg.com/kidlat-css/css/kidlat.css",
  ],
};

Vue.use(VueHtmlToPaper, options);

Am I doing something wrong? If so, any suggestions on how I could fix this?

Thank you!

temilolakutelu commented 3 years ago

same here

alimustofa commented 3 years ago

same here (1)

based on the error message, I think we have to remove the fourth parameter. wdyt?

https://github.com/mycurelabs/vue-html-to-paper/blob/master/src/index.js#L44

ref: Window.open()

hasibweb commented 3 years ago

I'm also getting the same console error. A boolean is being passed as a fourth parameter to window.open. This is not used and may cause an exception in a future release.

and also external style css not working

lialia-siterocket commented 3 years ago

Same problem

stephane-laurans commented 3 years ago

Same error on Google Chrome 90 but not on Google Canary 92.

jofftiquez commented 3 years ago

Hello v1..4.0 is now available. I will close this for now. Please open a new issue if anything happens. Thanks.