I am not a fan of the default header and footer settings that Firefox uses when printing. Too much info, most of which I do not care about. Like having the URL of the website. If I need it again, I have it bookmarked or a quick search for some keywords from the content should be sufficient. If I am printing it on paper, I don’t care about the URL. Same for the date and time. Some people (perhaps in business) may need this sort of info on their printouts, but I don’t need it and don’t want it.
Changing the header and footer info that is printed is very easy. The problem is that it resets after every print job. I have looked occasionally but never found a GUI way to change the info and have it stay changed. So today I delved into about:config. Sure enough, it isn’t that hard to do if you are willing to poke around “under the hood” a bit.
In the awesome bar, type about:config and hit return. You might get a warning page. If you do, click on “I’ll be careful, I promise” button to get to the config screen.
Here you can change pretty much all of Firefox’s settings (maybe all of them?). In the filter bar area, type “print.print_” (no quotes) so that we only see the config settings related to printing.
There may be a huge number of them, but don’t worry. We only need to change six at the most. The config entries we are care about are :
print.print_footercenter
print.print_footerleft
print.print_footerright
print.print_headercenter
print.print_headerleft
print.print_headerright
These are pretty self explanatory. The code-ish entries on the far right side under “value” are what Firefox uses by default for the header and footer settings. Don’t worry about the other columns.
As you can see in the screen shot above, I have already changed some of mine; entries that have been changed from the default are in bold (FF does this automagically, to make it easy to tell what has been changed, I assume). To change an entry, double click on it somewhere. A dialog box will pop up asking for the new value.
The codes we can use for printing in the header and footer are:
&P = page number
&PT = page number with total number of pages
&U = the URL of the page
&D = the date (and time, I think)
&T = the title of the page
(Thanks to this wonderful tutorial for this information.)
To set the page number to be at the top center of the page, double click print.print_headercenter, type in &P, and click OK. It is that easy. To make a part of the header or footer default to nothing, just delete whatever is currently in the value field. (Double click, press delete or backspace until the text area is blank, and then OK.)
There is no need to save settings, they take effect as soon as you change them. So be careful. When you are finished, just close the “about:config” tab. No need to restart Firefox. Now and in the future, your print options will default to how you set them.
As you can see from the screen shot above, I set up the default header and footer for the title in the top left and Page X of Y in the bottom center. Everywhere else is blank.
Bonus: while we are here, if you want “print to file” to default to pdf rather than ps, change the value of print.print_to_filename to something like /home/chris/firefox-default-print-to-file.pdf. Obviously it doesn’t have to be that long, but end it with pdf and the next time you print to file, it will automagically be set to file type pdf instead of ps.




![Cool! No more changing from PS to PDF by hand every time I want to print something. [No, I am not sure why the printer status is in Japanese.] (click for bigger image in new window) Print to file now defaults to PDF](http://osugisakae.com/images/firefox-printing/ff-print-04.jpg)
Post a Comment
You must be logged in to post a comment.