如何在Chrome无头模式下指定PDF输出路径

如何在Chrome无头模式下指定PDF输出路径,pdf,google-chrome-headless,Pdf,Google Chrome Headless,显示您现在可以使用chrome通过以下CLI命令生成网页的PDF: chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/ 但是,它没有说明如何指定输出路径 如何指定输出路径 chrome --headless --disable-gpu --print-to-pdf="C:/temp/pdftest.pdf" https://www.google.com/ 资料来源:

显示您现在可以使用chrome通过以下CLI命令生成网页的PDF:

chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/
但是,它没有说明如何指定输出路径

如何指定输出路径

chrome --headless --disable-gpu --print-to-pdf="C:/temp/pdftest.pdf" https://www.google.com/
资料来源: