Headless chromium - parse javascript before printing to pdf from command line

Viewed 153

I can't find anywhere online how to use the --print-to-pdf with a html file containing javascript. The html file I am trying to transform to pdf contains VueJS components. So the headless chrome have to parse the javascript before generating the pdf but it doesn't do it.

I want to do it from the command line. Do someone have any recommendations ?

Thank you.

1 Answers

I found the answer. When you provide a .html file directly to the command, it does not parse the JavaScript. You have to provide a URL.

Related