Hello,
Do you have an code example of how i can convert a html page to TIFF?
Thanks
Printable View
Hello,
Do you have an code example of how i can convert a html page to TIFF?
Thanks
Are you hosting the browser? If so... just capture your form image and save it as TIFF...
If you're not hosting the browser in your application... google "c# capture window image" for some examples on capturing the contents of other windows as an image.Code:Rectangle form = this.Bounds;
using (Bitmap bitmap = new Bitmap(form.Width, form.Height))
{
using (Graphics graphic =
Graphics.FromImage(bitmap))
{
graphic.CopyFromScreen(form.Location,
Point.Empty, form.Size);
}
bitmap.Save("D://test.tif", ImageFormat.Tiff);
}
I found this simple and easy to use .net library to convert html to tiff in c sharp.
you can convert your html to jpg, png, gif, tif and bmp.
this library can be used to convert your url to image in any .net project
see this article:
http://www.converthtmltoimage.com/Co...in-vb.net.html
sample code you you:
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();
refer this post on Codeguru - http://forums.codeguru.com/showthrea...03#post2156903
Or try sample for converting Html to Image on MSDN
kind regards
You can use itextsharp dll in C# and convert to tiff.