Is there any way to save in PDF automatically the website with window.print() or Ctrl+P in Firefox?

43 Views Asked by At

When I am on any web page (e.g https://stackoverflow.com/) I would like to save it in PDF automatically from Firefox with 'Mozilla Save to PDF'. For example Ctrl+P or window.print() method from console.

I use these configs (about:config and about:preferences):

browser.download.folderList "2" browser.download.dir "/path/to/download/directory" browser.helperApps.neverAsk.saveToDisk "*" print_printer "Mozilla Save to PDF" print.always_print_silent "true"

Always ask you where to save files -> not checked Content-type PDF -> Save file in the Applications section

When I use the Ctrl+P hotkey or window.print(), not happened enything.

I have tried the metioned above configs. Could you give some suggessions? I have to use it in manual and selenium-js tests.

0

There are 0 best solutions below