Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Print page setup in Firefox

📅 2023-Feb-13 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ firefox ⬩ 📚 Archive

Problem

Recently I tried to print a webpage to PDF using Firefox 109.0.1 and noticed that it prints the URL and other information in the header and footer of each PDF page. I did not want any header or footer information and I further wanted to change the margins too. Looking around the Firefox UI I did not see any option to change the page setup.

Solution

Firefox seems to have removed the page setup option from recent versions. I am guessing that is because not many people print webpages either to PDF anymore.

Thankfully, the page setup option can still be restored from about:config by setting print.show_page_setup_menu to true. Once this is done, you can open a simple page setup dialog by pressing F10 (to display the titlebar) and choosing File -> Page Setup. Here I found options to set the header, footer and page scale/size. By default, I found that this config toggling had reset the page scale to a terrible 10% (tiny!).

All the page setup customization options can be found in about:config by searching for print.printer_Mozilla_Save_to_PDF. I changed the following options to get a decent looking PDF:


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧