I have an HTML file containing a slideshow, and I would like to print it in PDF. What I do so far is opening the file with Brave Browser and printing it in PDF from Brave (this only works with browsers with a Chromium base). I would like to automate this, so that I can print it with a single script.
I can open the file in Brave with:
brave-browser html_file.html
I am now wondering if I can print the page in PDF using Brave from the command line. Is this possible? More generally, can we replicate actions in browsers from the command line?
--incognito
after the command in my post opens the HTML file in a private window (as expected) but--print-to-pdf
does not work. Could you test it?