Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

The suitable tools are CutyCapt for WebKit (Safari, Google Chrome) and IECapt (MS IE).

Flying Saucer is a Java-based XHTML & CSS2.1 renderer that passess ACID2 with some error caveats. Its downside is that it has no error handling. It is not really designed to be a browser, but rather to be a component used to display HTML content (help files, etc.) within an application.

I'm enjoying using url2png for these types of jobs/screenshots.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top