Make Chrome Headless to Wait for Ajax Before Printing to PDF

后端 未结 1 1123
眼角桃花
眼角桃花 2021-02-02 07:39

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.

1条回答
  •  不知归路
    2021-02-02 08:30

    chrome --headless http://localhost:8080/banana/key --run-all-compositor-stages-before-draw --print-to-pdf=C:\tmp\tmp.pdf --virtual-time-budget=10000

    Try this, virtual-time-budget is the parameter which can delay it.

    0 讨论(0)
提交回复
热议问题