# Rendering HTML as an image

**URL:** <https://www.ruby-forum.com/t/rendering-html-as-an-image/75725>\
**Category:** Rails\
**Created:** [November 12, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/rendering-html-as-an-image/75725 "2006-11-12T20:40:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![philswenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7feea3/32.png) [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Post date:** [November 12, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/rendering-html-as-an-image/75725/1 "2006-11-12T20:40:58Z")

</div>

Anyone know of any good tools (server side) that will render HTML as an  
image? I need this for an ad serving project and the client wants the  
ads rendered as images.

I’m guessing there isn’t anything rubyish out there, but I could make a  
call from ruby to java or C if needed.

thanks

---

<div class="post-metadata">

**Author:** ![philswenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7feea3/32.png) [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Post date:** [November 13, 2006, 12:20pm UTC](https://www.ruby-forum.com/t/rendering-html-as-an-image/75725/2 "2006-11-13T12:20:36Z")

</div>

RMagick should do the trick:  
[http://www.simplesystems.org/RMagick/doc/draw.html#text](http://www.simplesystems.org/RMagick/doc/draw.html#text)

---

<div class="post-metadata">

**Author:** ![philswenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7feea3/32.png) [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Post date:** [November 13, 2006, 6:27pm UTC](https://www.ruby-forum.com/t/rendering-html-as-an-image/75725/3 "2006-11-13T18:27:38Z")

</div>

Oh, sorry, missed that part (actually the most important one…)

---

<div class="post-metadata">

**Author:** ![philswenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7feea3/32.png) [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Post date:** [November 13, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/rendering-html-as-an-image/75725/4 "2006-11-13T17:46:43Z")

</div>

Kitto wrote:

> RMagick should do the trick:  
> [RMagick 1.15.0: class Draw](http://www.simplesystems.org/RMagick/doc/draw.html#text)

Rmagick, while awesome, will not render HTML as an image.

---

<div class="post-metadata">

**Author:** ![philswenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7feea3/32.png) [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Post date:** [November 13, 2006, 8:46pm UTC](https://www.ruby-forum.com/t/rendering-html-as-an-image/75725/5 "2006-11-13T20:46:33Z")

</div>

Phil S. wrote:

> Anyone know of any good tools (server side) that will render HTML as an  
> image? I need this for an ad serving project and the client wants the  
> ads rendered as images.
> 
> I’m guessing there isn’t anything rubyish out there, but I could make a  
> call from ruby to java or C if needed.
> 
> thanks

Here is the breakdown of the options for using website thumbnails:

> **[:: Website Thumbnail Creators (Website Snapshot Generators) :: Articles](http://www.zubrag.com/articles/create-website-snapshot-thumbnail.php)**
>
> Nowadays a lot of webmasters are looking for a website snapshot tool in order to make data presentation more attractive to their visitors. This article describes different approaches, along with pros and cons.

The part you are looking at is #3. It’s a tricky procedure.
