$ 0 0 In case it is still relevant, all you need to know is described here: Generate image from HTML markup