HACKER Q&A
📣 hknmtt

Headles Firefox on Windows?


I am trying to use firefox to save a website as image and, most importantly, as PDF but the headless mode does not seem to be working on Windows 10. I tried everything I could find on the internet but still no luck.

Chrome ditto. I am baffled by this.


  👤 hknmtt Accepted Answer ✓
For anyone who might be looking at the same problem, here is working chrome/chromium:

chrome.exe --headless --dissable-gpu --window-size=1920x5400 --screenshot="C:\\Users\Foo\\Desktop\\img.png" "https://somesite.com"

chrome.exe --headless --dissable-gpu --save-to-pdf="C:\\Users\Foo\\Desktop\\doc.pdf" "https://somesite.com"


👤 sanatgersappa
Use playwright. Works fine.