-
December 8th, 2005, 06:08 AM
#1
How to convert html to tiff using C#?
Have anyone of you a code snipet that would convert html page into tiff picture?
Thanks!
-
December 8th, 2005, 02:56 PM
#2
Re: How to convert html to tiff using C#?
One possibility would be to embed the web browser control in a Form to render the html and then copy its contents into a Bitmap. This Bitmap can then be saved in TIFF format.
Useful? Then click on (Rate This Post) at the top of this post.
-
May 14th, 2014, 07:59 AM
#3
Re: How to convert html to tiff using C#?
I use Websites Screenshot component in all my .NET projects requires HTML to Image conversion.
This component can be use to convert url to image and local html files to image.
See this Article:
http://www.converthtmltoimage.com/Co...in-vb.net.html
Sample code for you to try:
WebsitesScreenshot.WebsitesScreenshot _Obj;
_Obj = new WebsitesScreenshot.WebsitesScreenshot ();
WebsitesScreenshot.WebsitesScreenshot.Result _Result;
_Result = _Obj.CaptureWebpage("http://www.google.com");
if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Captured)
{
_Obj.ImageFormat = WebsitesScreenshot.
WebsitesScreenshot.ImageFormats.TIF;
_Obj.SaveImage ("c:\\google.tif");
}
_Obj.Dispose();
-
June 13th, 2014, 03:27 AM
#4
Re: How to convert html to tiff using C#?
Originally Posted by Epics
Have anyone of you a code snipet that would convert html page into tiff picture?
Thanks!
try this
Code:
Document document = new Document();
document.LoadFromFile(@"D:\test.html", FileFormat.Html, XHTMLValidationType.None);
Image image = document.SaveToImages(0, ImageType.Bitmap);
image.Save("Sample.Tiff", ImageFormat.Tiff);
Full sample code can be found here -How-to-Convert-HTML-to-Image.
regards,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|