Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Take a full page screenshot with Firefox on the command-line

People also ask

How do I screenshot a whole page in Firefox?

You can take screenshots to capture visible parts of web pages, or even full web pages, and copy or save these images. To take a screenshot: Right-clickHold down the control key while you click on an empty part of the page and select Take Screenshot. Alternatively, use the keyboard shortcut Ctrl + Shift + S .

How do I take a screenshot of the entire command prompt?

First off all open cmd in full screen mode then click on print screen button after that open paint brush and press ctrl + v (past) you can save it in any where, where ever you want (file type should be . png).

Is there a way to take a screenshot of an entire webpage?

Click the three-dot icon from the top-right corner and select Run command. Also, you can press Ctrl+Shift+P on Windows or Command+Shift+P on Mac. Type screenshot into the search box. Select Capture full-size screenshot.


The Developer Toolbar GCLI and Shift+F2 shortcut were removed in Firefox version 60. To take a screenshot in 60 or newer:

  • press Ctrl+Shift+K to open the developer console (⌥ Option+⌘ Command+K on macOS)
  • type :screenshot or :screenshot --fullpage

Find out more regarding screenshots and other features


For Firefox versions < 60:

Press Shift+F2 or go to Tools > Web Developer > Developer Toolbar to open a command line. Write:

screenshot

and press Enter in order to take a screenshot.

To fully answer the question, you can even save the whole page, not only the visible part of it:

screenshot --fullpage

And to copy the screenshot to clipboard, use --clipboard option:

screenshot --clipboard --fullpage

Firefox 18 changes the way arguments are passed to commands, you have to add "--" before them.

Firefox 88.0 has a new method for taking screenshots. If extensions.screenshots.disabled is set to false in about:config, you can right-click the screen and select Take Screenshot. There's also a screenshot menu button you can add to your menu via customization.

You can find some documentation and the full list of commands here.

PS. The screenshots are saved into the downloads directory by default.


Update 2018-07-23

As was just pointed out in the comments, this question was about getting a screenshot from the command line. Sorry, I just read over that. So here is the correct answer:

As of Firefox 57 you can create a screenshot in headless mode like this:

firefox -screenshot https://developer.mozilla.com

Read more in the documentation.

Update 2017-06-15

As of Firefox 55 there is Firefox Screenshots as a more flexible alternative. As of Firefox 57 Screenshots can capture a full page, too.

Original answer

Since Firefox 32 there is also a full page screenshot button in the developer tools (F12). If it is not enabled go to the developer tools settings (gear button) and choose "Take a fullpage screenshot" at the "Available Toolbox Buttons" section.

developer tools toolbarsource: developer.mozilla.org

By default the screenshots are saved in the download directory. This works similar to screenshot --fullpage in the toolbar.


I ended up coding a custom solution (Firefox extension) that does this. I think by the time I developed it, the commandline mentioned in enreas wasn't there.

The Firefox extension is CmdShots. It's a good option if you need finer degree of control over the process of taking the screenshot (or you want to do some HTML/JS modifications and image processing).

You can use it and abuse it. I decided to keep it unlicensed, so you are free to play with it as you want.


I think what you are looking for is a utility which enables you to save a complete page opened in your browser into a png file. Most probably you are looking for a utility like commandlineprint2.

After installing the extension, you just need to type the command:

firefox -print http://google.com -printfile ~/foo.png

Firefox Screenshots is a new tool that ships with Firefox. It is not a developer tool, it is aimed at end-users of the browser.

To take a screenshot, right-click on an empty space on the page, and choose "Take Screenshot". If you then click "Save full page", it will save the full page, scrolling for you.

(source: mozilla.net)