While browsing the print-js documentation, I came across a feature that allows us to pass style as a string to the printJS
function. However, when attempting to apply this style, I encountered an error preventing the print action:
The error I'm facing is:
ReferenceError: Can't find variable: style
In my Vue component, I am passing the style to printJS like so:
printSlip: function(){
printJS('printSlip', 'html', style="display: inline-block; text-align: center; padding: 30px; margin: 15px; text-align: center; padding: 15px; vertical-align: top;");
},