I spent about 4 hours looking for a solution to this the other day, with no luck.
I need a command-line driven answer that doesn't require a browser or graphical environment.
I looked at the gecko and webkit engines and all over google, but i had no success.
I would think that it wouldbe easy to implement in one of the content engines, but they all seem to be tied to rendering to a display.
-pete
"Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."