13

How can I emulate the media type "print" in the new Firefox Quantum dev console?

Tried to enable it somehow and searched the documentation but couldn't find any hints!

nerdess
  • 8,263
  • 10
  • 34
  • 45
  • Possible duplicate of [Faster way to develop and test print stylesheets (avoid print preview every time)?](https://stackoverflow.com/questions/9519556/faster-way-to-develop-and-test-print-stylesheets-avoid-print-preview-every-time) – dippas Dec 18 '17 at 22:47
  • @nerdess Would you mind switching the accepted answer to my answer below? The currently accepted answer is not up to date anymore, and I have provided the new correct answer below. – MoritzLost Dec 03 '20 at 10:26

2 Answers2

47

After the GCLI (Developer Toolbar) has been removed, the feature is now once again available in the latest nightly version of Firefox. Print style emulation can now be toggled from the styles panel in the Inspector of the Developer Tools. It's the little page icon in the upper right, next to the buttons to change the hover state, toggle classes and add CSS rules (toggled active in the screenshot):

Simulate media print in Firefox 68+

As of May 2019, this has not yet landed in the current stable release (66), but it is available in the current Developer Edition and the Nightly Channel (68.0a1 and above).

Update August of 2019 (v68)

Version 68 has landed in the stable release channel, so the feature is now available in all Firefox distributions.

Community
  • 1
  • 1
MoritzLost
  • 1,494
  • 2
  • 12
  • 24
13

[UPD] this console has gone starting from v62. But after some time toggle button for switching into Print mode is available in DevTools again. Please check another answer below(unable to delete accepted answer)

I thought it's impossible. But suddenly have found answer in another topic:

  1. press Shift + F2 to get special browser console
  2. type "media emulate print"
  3. hit "Enter"

That's it.

skyboyer
  • 15,149
  • 4
  • 41
  • 56
  • 1
    thanks! on the mac it is shift + fn + F2 to get to this "special" console :) – nerdess Dec 19 '17 at 09:34
  • 12
    This console has been removed since Firefox 62. There is no way how to emulate print media type now, AFAIK. – Behnil Sep 05 '18 at 18:30
  • WTF Mozilla? Why would you remove this? – Kyle O Nov 30 '18 at 06:31
  • 1
    @KyleO While I lament it as well, they had good reasons. It was not being maintained and allowances for the code to remain/continue working was blocking other necessary changes/features. – TylerH Aug 07 '19 at 19:37
  • The answer is not valid – Nazar Vynnytskyi Nov 09 '20 at 20:46
  • @Nazar VynnytskyI once you untick "Accepted answer" mark, I'll be able to delete it – skyboyer Nov 09 '20 at 22:43
  • 1
    The [Firefox documentation](https://developer.mozilla.org/en-US/docs/Tools/Browser_Console) for the Browser Console states that the Browser Console command line is disabled by default but lists a few ways it can be enabled. – wubbalubba Apr 29 '21 at 19:00