[Vuejs]-Make a pdf out of a Vue.js component that is not rendered in the router-view

0๐Ÿ‘

I ended up trying to rephrase the problem and got to this question and answer: How to call function on child component on parent events

I gave up the whole custom event solution and simply ended up triggering the print to pdf method present in the child component from the parent, when the click event is fired.

0๐Ÿ‘

You can only generate PDF (printable) of the content that is being displayed on the page. What actually happens is chrome converts the view to an image that can be printed this can be done by using the window.print() function but it will not work until the content is displayed on the screen.

For generating PDF out of json data and without showing it to user, i will recoment you to check some third party libraries like jsreport

Leave a comment