Generate image from HTML markup
HTML Renderer can be used to generate image (pmg, jpeg, bmp...) from HTML markup string.Because of GDI text rendering issue with alpha channel clear type text rendering rendering to image requires special handling.
HTML used in examples
<body style="font: 10pt Tahoma"> <h3 style="color: navy; margin-bottom: 8px">Render to Image</h3> <hr /> <table style="border: 1px solid maroon; width: 100%; margin-top: 5px"> <tr style="vertical-align: top;"> <td width="32" style="padding: 2px 5px 0 0"> <img src="http://download-codeplex.sec.s-msft.com/Download?ProjectName=HtmlRenderer&DownloadId=770243" /> </td> <td>This <i>text</i> is inside a <b>table</b> <u>element</u>.<br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ornare mollis elit. </td> </tr> </table> <ul style="margin-top: 5px"> <li><span style="color: red">Colors</span></li> <li><span style="background-color: #8dd">Back colors</span></li> </ul> </body>