How to specify PDF output path in Chrome headless mode

This page shows that you can now use chrome to create a PDF page of a web page using the following CLI command:

chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/ 

However, it does not indicate how to specify the output path.

How do you determine the output path?

+5
source share
1 answer
 chrome --headless --disable-gpu --print-to-pdf="C:/temp/pdftest.pdf" https://www.google.com/ 
+9
source

Source: https://habr.com/ru/post/1269072/


All Articles