问题
This page shows that you can now use chrome to generate a PDF of a webpage using the following CLI command:
chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/
However, it does not state how to specify the output path.
How do you specify the output path?
回答1:
chrome --headless --disable-gpu --print-to-pdf="C:/temp/pdftest.pdf" https://www.google.com/
source:
https://cs.chromium.org/chromium/src/headless/app/headless_shell.cc?type=cs&l=63
来源:https://stackoverflow.com/questions/44681065/how-do-i-specify-pdf-output-path-in-chrome-headless-mode