When I make a new Vue project and use wkhtmltopdf, it renders a blank page.
Steps to reproduce:
- vue create hello-world
- Choose: Default (Vue 3, babel, eslint)
- npm run serve
- Check in browser that it works: http://localhost:8081
- ./wkhtmltopdf --javascript-delay 10000 --debug-javascript "http://localhost:8081/" "test.pdf"
The response is:
Loading pages (1/6)
Warning: undefined:0 TypeError: 'undefined' is not a function
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
The PDF is rendered, but the page is blank. I assume 10 seconds is more than enough to render it after load.
This is just a case to illustrate my problem. My real project is more complex, because I use webpack, axios and more. While I get one warning in the example above, I get multiple warnings during processing of wkhtmltopdf in my real project:
In my real project, the URL works fine in the browser, just like the hello-world project above. I also tried it with option --window-status and/or with a JavaScript setTimeout, but none seems to do the trick.
What should I do different to make wkhtmltopdf work with Vue? Thanks for any help.