How do I Specify PDF Output Path in Chrome Headless Mode

会有一股神秘感。 提交于 2019-11-29 09:26:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!