title: Make Chrome Headless to Wait for Ajax Before Printing to PDF
body: <p>I'm trying to use chrome headless to print my webpage to a PDF file.
  The PDf file is with no data, because the headless chrome is printing it before the ajax commands finish.</p>
  
  <p>Any idea on how I can get it to wait?</p>
  
  <p>Here's the command I currently use:</p>
  
  <pre><code>chrome --headless http://localhost:8080/banana/key --run-all-compositor-stages-before-draw --print-to-pdf=C:\\tmp\\tmp.pdf
  </code></pre>