More Thoughts on HTML To Image (Plus Code)

Yesterday I posted a demo of a UDF that I had been working on to convert HTML (via a URL or raw HTML) to an image. The UDF works OK, but to be honest it's not all that great. Let me quickly explain the process (as some had guessed in the comments on that post yesterday).

Essentially I'm tapping into some Java objects that are used internally in CF 8 for the HTML rendering for <cfpresentation> and creating an internal web browser using that API. I then load the remote URL (or HTML string) into that browser and paint the contents into a buffered image. In theory it works. Unfortunately the HTML rendering engine is not all that hot when it comes to CSS support (as you can see in the following screenshots):

My blog:

ColdFusionBloggers.org:

Dan Vega's Blog:

As I said, not so hot. So I'm releasing the code (under the Apache license) in hopes that it's useful to someone and by some off chance someone has some thoughts on how to improve it (see attachment below). I'm thinking of some other possible solutions, so I haven't completely given up on the idea yet.

PS - don't get me wrong, I do think the component is useful. If you slide it in your application please let me know.

Comments
Looks cool Todd :) Out of curiosity did you try the ICEbrowser trial version to see if the rendering has improved, or are the components that ship with CF8 fairly up-to-date?

Those ICE products seem to cost a bomb!
# Posted By Justin Carter | 4/6/08 9:52 PM
I did try the trial version - it was crap as well. I can't believe people pay for that...

My next thought was to dig in and see if anyone has implemented the open source Webkit html rendering engine in Java. That will have to wait though, because for what I'm doing this UDF is working fine (just simple raw HTML to image).
# Posted By todd sharp | 4/7/08 9:57 AM

Calendar

Sun Mon Tue Wed Thu Fri Sat
  12345
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31   

Subscribe

Enter your email address to subscribe to this blog.

Tags

actionscript ajax blogging cfsnippets coldfusion flash forms flex misc model-glue off topic personal project learn slidesix sql

Recent Comments

More CF+Java: Compiling Classes And Persisting Objects
Getburl said: I have been attempting to get Db4o working in my CF application and I have not succeeded. I would lo... [More]

Thoughts On Ajax Frameworks And ColdFusion/Adobe
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

Extending Ext With Ext Extensions
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

CF Needs An Open Source Contact List Importer
Kay Smoljak said: Heh, the fact that sites DO it doesn't mean they SHOULD. To us it's ok, but to a non-tech-savvy user... [More]

A Few Project Updates
Helena said: Now punctually what is the situation ? [More]

RSS


coldfusionbloggers

FullAsAGoog MXNA

Consumed By Feed-Squirrel.com