The file name is pulled from the title tag in the HTML page and is not set by any code in DFFS so you can change it by writing a new title to this tag:
So that changed the title when printing from the default browser function. However, I’m trying to change the file name when using the DFFS “Print Active Tab” functionality.
I just tested it and what he provided changes the file name when using the dffs print active tab functionality. Are you sure you are using it properly?
As Steve noted it should work for both (at least in Chrome where I have tested). What name are you getting for the file when printing a tab? – just a random name, or like this: [site title] – [item title]?