4

I am trying to convert a HTML file to a PDF file. Now I am using chrome headless.

I am following this https://developers.google.com/web/updates/2017/04/headless-chrome

And when I enter this command :

google-chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/

Sometimes it shows like this :

enter image description here

I tried with the other pages but they are same.

I think it needs a delay to render the javascript chart.

Is there any way to set a delay for converting?

BingbongKim
  • 549
  • 1
  • 6
  • 18
  • [See this SO answer](https://stackoverflow.com/questions/49614437/make-chrome-headless-to-wait-for-ajax-before-printing-to-pdf) This worked for me. – JohnWrensby Jun 25 '18 at 21:48

0 Answers0