Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox headless --print-to-pdf option

Does Firefox headless include the option to print to PDF ? Chrome headless supports it, but im not sure if Firefox does.

like image 487
litenull Avatar asked Jan 20 '18 16:01

litenull


People also ask

How do I add a PDF as a print option in Mozilla Firefox?

Try clicking the '3-bar' menu icon on your Firefox browser - > Print... In the Print window click the drop down menu and choose Save as PDF...

Can Firefox run headless?

A headless browser is a web browser without a user interface, it means the browser is running in the background (invisbile). This is great if you want to start a web browser to do tasks, but you don't want or need to see it. You can use any Web Browser like Firefox or Chrome in a headless mode.


1 Answers

I don't seem to find any reference to printing to PDF for Firefox headless mode. However, there's an option to take a screenshot of the page since Firefox 57:

/path/to/firefox -headless -screenshot https://developer.mozilla.com
like image 179
Dexter Avatar answered Oct 25 '22 02:10

Dexter