I did some research on this and i found a solution which is not particularly
easy to implement, but it is doable.
if you want to do all these programatically, it is not easy.
First of all, you'll need to transform whatever Html you want to a new xhtml
file/stream, (XHTML is a newer generation of html markup stated in XML). Or
you can configure your ASP.Net application to render XHTML content.
Step 2: you'll need to transform XHTML to FO(formating object language)
using a XML Stylesheet (XSL transformation).
Step 3, Convert FO file/stream to a PDF file. You can achieve this step by
using an opensource compiled dll called nfop which is hosted on
sourceforge.net.
Step 4. Convert PDF file/stream to an image file/stream. I am aware there
are some third party API out there for doing this step, but they are not
cheap unless you want to implement your own converter. You can probably skip
this step if you can find an API to convert XSL-FOs to images directly.
So basically, here is the streamline process.
HTML ------->XHTML -----FO ---------PDF ------------JPEG
XSL NFOP Converter
Let me know if you have any questions.
Zhenzhong
fl*****@gmail.com
"PenguinPig" wrote:
Dear Kevin
Then how can I capture this image? Which class I should use? Since I am not
expert in this skill...
Thanks
"Kevin Spencer" <uc*@ftc.govwrote in message
news:u4**************@TK2MSFTNGP04.phx.gbl...
A browser does exactly what he wants. It converts HTML to an image, which
is
painted on the Client rectangle of the browser.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
What You Seek Is What You Get.
"Zhenzhong Xu" <Zh*********@discussions.microsoft.comwrote in message
news:50**********************************@microsof t.com...
The closest solution i can think of is to use Office's COM object to
convert
html pages to word documents, and then convert the word documents to
JPEG(or
other image) files.
>
However if you or anyone found a better solution, please let me know. I
am
fairly interested in this topic too.
>
Z.
fl*****@gmail.com
>
"PenguinPig" wrote:
>
>Dear All Experts
>>
>I would like to know how to convert a HTML into Image using C#. Or
allow
>me
>contains HTML code (parsed) in Image? I also tried this way but it just
>display the character "<" & ">" directly....
>>
>I have done googling, but all return shareware. I would like to know
how
>to
>programming...but not using shareware...
>>
>Thanks all.
>>
>>
>>
>>