使用Firefox的全屏截图 [英] Take a full page screenshot with Firefox

查看:970
本文介绍了使用Firefox的全屏截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VPS中的Xvfb上运行Firefox。



我可以使用

将Firefox重定向到特定网页

  firefox http://google.com 

并使用ImageMagick拍摄屏幕截图(在X内)

  import root -window output.jpg 


另一种方法是选择一个非常大的高度(如4000px),然后处理图像和删除无用的部分。但是这是不必要的处理。



我发现了许多Firefox加载项,但我正在寻找一个可以使用Shell命令行编程的解决方案。



编辑:我最后写了我自己的 FireFox扩展来执行此操作。

解决方案

由于 Firefox 16 ,您可以按 shift-F2 或转到工具>网络开发人员>开发人员工具栏打开命令线。写:

 截图




要完全回答这个问题,您甚至可以将整个问题保存下来,并按简介页面,不仅可见部分:

 屏幕截图--fullpage 

要将屏幕截图复制到剪贴板,请使用 - 剪贴板选项:

 屏幕截图--clipboard --fullpage 


$ b b

Firefox 18 更改了传递给命令的参数的方式,您必须先添加 -



您可以找到一些文档和完整的命令列表此处



PS。默认情况下,屏幕截图会保存在下载目录中。


I'm running Firefox on a Xvfb in a VPS. What I want to do is to take a full page screenshot of the page.

I can redirect Firefox to particular page using

firefox http://google.com

and take a screenshot (inside X) using ImageMagick

import root -window output.jpg

The problem is, most of the page need scrolling and I can't know the height beforehand.

The other way is to pick a very big height (like 4000px) and then process the image and remove the useless part. But that's unnecessary processing.

I found many Firefox add-ons, but I'm looking for a solution that can be programmed using the Shell Command line.

Edit: I ended up writing my own FireFox extension for doing this.

解决方案

Since Firefox 16 you can press shift-F2 or go to Tools > Web Developer > Developer Toolbar to open a command line. Write:

screenshot

and press Intro in order to take a screeshot.

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.

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

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

这篇关于使用Firefox的全屏截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆