# Capture a web scrolling page in a image

**URL:** <https://www.ruby-forum.com/t/capture-a-web-scrolling-page-in-a-image/129653>\
**Category:** Ruby\
**Created:** [February 20, 2008, 12:40pm UTC](https://www.ruby-forum.com/t/capture-a-web-scrolling-page-in-a-image/129653 "2008-02-20T12:40:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [February 20, 2008, 12:40pm UTC](https://www.ruby-forum.com/t/capture-a-web-scrolling-page-in-a-image/129653/1 "2008-02-20T12:40:00Z")

</div>

How can i capturie a web scrolling page in a image with ruby? i don’t  
want to capture only what is visible, i want to capture and the page  
after scrolling.

Tnx.

---

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [February 21, 2008, 12:24pm UTC](https://www.ruby-forum.com/t/capture-a-web-scrolling-page-in-a-image/129653/2 "2008-02-21T12:24:28Z")

</div>

On Wed, Feb 20, 2008 at 08:39:55PM +0900 Bulhac M. mentioned:

> How can i capturie a web scrolling page in a image with ruby? i don’t  
> want to capture only what is visible, i want to capture and the page  
> after scrolling.

You obviously need an html rendering engine in this case. ‘links -g’  
probably  
can do the trick.

I dobt there’re html rendering libraries in ruby.

---

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [June 5, 2010, 9:11am UTC](https://www.ruby-forum.com/t/capture-a-web-scrolling-page-in-a-image/129653/3 "2010-06-05T09:11:48Z")

</div>

Hi~  
Is there any update on this topic?  
When I’m using Watir to test a website. I think it would be good to have  
the screenshot of the website. There’re tools in IE or Firefox to do it.  
But I wonder if there’s something in Watir that can do this job  
directly?

Have you done anything similar to this? Please help.  
Many thanks!

---

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [February 21, 2008, 2:12pm UTC](https://www.ruby-forum.com/t/capture-a-web-scrolling-page-in-a-image/129653/4 "2008-02-21T14:12:50Z")

</div>

This is not a direct answer. Just hints, I hope.

webkit2png is a command line screen capture tool on Mac OS X.  
Many command line tools are listed in

> **[How to Capture & Save Screenshots of Webpages](https://labnol.blogspot.com/2006/06/how-to-capture-save-screenshots-of.html)**
>
> How to convert an entire website to an image file or PDF on Windows, Linux or Mac ? Some time back, we discussed several screen capture add-...

Browsershots has a XML-RPC interface. Its implementation gives us  
also many tricks how we can operate browsers. Python is used but.

> **[Check Browser Compatibility, Cross Platform Browser Test - Browsershots](https://browsershots.org/)**
>
> Check Browser Compatibility, Cross Platform Browser Test

MozRepl, which is included in MozLab, provides telnet interface to  
Firefox.  
[https://addons.mozilla.org/ja/firefox/addon/2692](https://addons.mozilla.org/ja/firefox/addon/2692)  
[http://hyperstruct.net/projects/mozrepl](http://hyperstruct.net/projects/mozrepl)

[http://screenshot.hatena.ne.jp/](http://screenshot.hatena.ne.jp/) is written in Ruby.  
That server communicates with dRuby programs which invoke  
IE based capture tool crenahtml2jpg on Windows.

Hope this helps,

Gotoken
