First let me make sure I understand your question. You want to create an image from your table background and draw text in your table onto the created image, right?
If so, you need to use classes under System.Drawing
Note that you need to play with the font, brush and positions. The image will be created from "~/photo/myphoto.jpg" and will be saved to "~/photo/output.jpg" with the text on it.
Member
56 Points
173 Posts
Converting HTML to an Image
Mar 26, 2011 01:32 PM|msdevm|LINK
Can any one explain how to convert HTML to System.Drawing.Image?
For instance I have an HTML that display an photo
<table border=0 width"100%" background="photo/myphoto.jpg">
<tr><td>Picture name</td></tr>
<tr><td>Author name</td></tr>
<tr><td>Date Created</td></tr>
</table>
I would like to create an images from the table background jpg and content in td
TIA
Participant
1501 Points
445 Posts
Re: Converting HTML to an Image
Mar 27, 2011 07:53 PM|Small Peter|LINK
First let me make sure I understand your question. You want to create an image from your table background and draw text in your table onto the created image, right?
If so, you need to use classes under System.Drawing
Documentation for System.Drawing from MSDN can be found at http://msdn.microsoft.com/en-us/library/system.drawing.aspx
And here I write this sample you may find helpful
Note that you need to play with the font, brush and positions. The image will be created from "~/photo/myphoto.jpg" and will be saved to "~/photo/output.jpg" with the text on it.
Member
56 Points
173 Posts
Re: Converting HTML to an Image
Mar 29, 2011 11:02 AM|msdevm|LINK
That was great? Thanks for reply also I appriciate the coding tips.
Can the same be converted to adobe PDF using the System.Drawing as well?
Thanks