41

I'm not talking of the Print Preview - I mean to view the webpage in Firefox "normally", with access to e.g. the F12 Developer Tools, but I want the layout to be the same as if I was printing the page out.

gaazkam
  • 943
  • 1
  • 6
  • 21

5 Answers5

55

Devtools Screenshot with a nice and friendly ponting arrow

There is now (June 2019) a nice button in the devtools. See this discussion mentioned in the answer by @interDist above.

Worthwelle
  • 4,538
  • 11
  • 21
  • 32
Alexander Rutz
  • 707
  • 6
  • 4
  • 1
    This solved my problem - the new button was hidden because my style pane was too narrow. Following your screenshot, I widened my pane and got a live print media preview. – Qsigma Jul 23 '19 at 13:50
  • 2
    Additional tips for context: this is actually inside `Inspector` tab and its subview `Rules` which is the part that shows the applied CSS rules for currently selected DOM node. The tootip for the button says "Toggle print media simulation for the page". At first I was looking for this in the top toolbar of Web Developer Tools. – Mikko Rantalainen Jul 02 '21 at 14:49
  • @gaazkam Could you please select this as an answer? – M at Jul 14 '21 at 10:18
13

From https://developer.mozilla.org/pl/docs/Tools/GCLI : Launch the Developer Toolbar with Shift+F2, then type: media emulate print

Somehow it doesn't solve my problem though, this what I see after this command differs from the Print Preview and from what is printed out... :(

gaazkam
  • 943
  • 1
  • 6
  • 21
10

As of September 2018, no, there is no such option. The Developer Toolbar, mentioned by @gaazkam, was removed in Firefox 62 in September 2018. There is no replacement for the media emulate command in DevTools, although it may be given some priority now that the command line interface is gone. Discussion is also here: https://discourse.mozilla.org/t/how-to-media-emulate-print-without-developer-toolbar-gcli/30975.

interDist
  • 211
  • 2
  • 6
6

This can be done using the developer tools by pressing the 'Toggle print media simulation for the page' button in the styles panel.

Example of print tools

Jon Koops
  • 161
  • 1
  • 1
0

This doesn't work for me at all. Using Bootstrap 4.6, almost NOTHING happens when I choose this, both in FF and Chrome. The only think that happens is that my elements with class print-none disappear.

Chris
  • 13
  • 4
  • 2
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 05 '23 at 13:22
  • Sorry. Could find no way to comment on someone else's answer... There seems to be no button or field under them. – Chris May 06 '23 at 17:49