Reputation: 81
I am using vue-html-to-paper to print in my vuejs app and followed the doc, but styles is not loading into print window, when click on print getting console log as in pic
const options = {
name: "_blank",
specs: ["fullscreen=yes", "titlebar=yes", "scrollbars=yes"],
styles: ["./assets/css/demo.css"],
};
Vue.use(VueHtmlToPaper, options);
Upvotes: 1
Views: 1460
Reputation: 11
I assume you're using Webpack in your project. If so, you'll need to place the assets directory in your /public directory (not in /src). Webpack ignores everything in that directory and so they are served as usual. More info
Short answer: Put your /assets folder in /public and the styles should load.
Upvotes: 1