Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Headless HTML rendering, preferably open source

I'm currently looking to perform some headless HTML rendering to essentially create resources off screen and persist the result as an image. The purpose is to take a subset of the HTML language and apply it to small screen devices (like PocketPCs) because our users know HTML and the transition from Photoshop to HTML markup would be acceptable.

I am also considering using WPF Imaging so if anyone can weigh in comments about its use (particularly tools you would point your users to for creating WPF layouts you can convert into images and how well it performs) it would be appreciated.

My order of preference is:

  1. open source
  2. high performance
  3. native C# or C# wrapper
  4. lowest complexity for implementation on Windows

I'm not very worried about how feature rich the headless rendering is since we won't make big use of JavaScript, Flash, nor other embedded objects aside from images. I'd be fine with anything that uses IE, Firefox, webkit, or even a custom rendering implementation so long as its implementation is close to standards compliant.

like image 583
cfeduke Avatar asked Sep 17 '08 20:09

cfeduke


3 Answers

http://www.phantomjs.org/

Full web stack

PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

like image 123
bmustata Avatar answered Nov 06 '22 09:11

bmustata


You can use Gecko to do this.

like image 28
Jim Avatar answered Nov 06 '22 09:11

Jim


I have found IECapt during my search which actually includes a C# implementation. Although it is by design a CLI application the source code is provided so I can likely modify it for my own needs.

like image 35
cfeduke Avatar answered Nov 06 '22 07:11

cfeduke