-1

I currently manually open HTML files using Brave browser and print the files to PDF files. I want to automate this process in the command line. Is there a way to do it? Since Brave is based on chromium, solutions based on Chromium and Google Chrome are also welcome.

karel
  • 5,489
  • 46
  • 45
  • 50
user1424739
  • 11,937
  • 17
  • 63
  • 152

1 Answers1

0

This is a common use for calling the executable in headless or kiosk modes.

Your milage may vary compared to running heads up with a robotic puppet to press buttons for you, but more often than not is so much simpler for every day basic use in a batch file for multiple uses it is a second or so for each pdf generation.

Edge is not different to Brave or Chromium's so find the executable and append here using windows user folder

--headless --enable-logging --print-to-pdf="%UserProfile%\Documents\Demofile.pdf" --disable-extensions --print-to-pdf-no-header --disable-popup-blocking --run-all-compositor-stages-before-draw --disable-checker-imaging "HTTPs://url"

So darn quick I did not know it had run until opening the result, however note it needs the target to not pop-up blockers like google does, hence next step up is a button pusher to replace you by eating cookies. enter image description here enter image description here

K J
  • 8,045
  • 3
  • 14
  • 36