I am trying to print from my Vuejs component and apply CSS and Bootstrap styles to the printed page.
Currently, I am using window.print()
inside the mounted
lifecycle hook as shown below:
export default {
mounted() {
window.print();
}
}
However, the CSS and Bootstrap styles are not being rendered on the print screen. Can someone please suggest a solution for this issue?
UPDATE: I am using the adminlte Template, which may be causing the problem.