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.
In short I used this DLL for Word documents processing in C#. What it does is it reads the HTML content and saves it into a TIFF file with multiple frames. Each frame is a page and each page is of an "A4" size. You can also find some additional samples of this DLL's usage here.
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Sep 20, 2011, 3:04 AM EDT
make sure the html is either xhtml or xml->friendly html. then use apache
FOP to convert it to tiff.
Johan Lijffijt10 reputationPosted Sep 20, 2011, 3:09 AM EDT
I prefer to have a piece of code example so i can fully understand how this is done.
Hemant KumarRank #1,202 · 1.5K reputationPosted Sep 20, 2011, 7:15 PM EDT
fdsfew fewf4 reputationPosted Jul 22, 2013, 7:18 PM EDT
RasterEdgeImaging TIFF = new RasterEdgeImaging(); public void TiffConvertToHtml(); { TIFFInputFile = (@"C:/1.tif"); ImageOutputFile = ImageFormat.htm; } TIFF.Save(@"C:/1.tif", 1, @"C:/1.htm");Riyaz AkhtarRank #2,275 · 619 reputationPosted Jul 22, 2013, 8:36 PM EDT
http://www.codegod.com/screenshot-of-webpage-with-aspnet-AID398.aspx
Farh Omar4 reputationPosted May 14, 2014, 5:09 AM EDT
http://www.converthtmltoimage.com/Convert-html-to-tiff-in-vb.net.html
code sample:
Kimberlee Lowe30 reputationPosted May 21, 2015, 11:37 PM EDT
DocumentModel document = DocumentModel.Load("Sample.html"); Section section = document.Sections[0]; section.PageSetup.PaperType = PaperType.A4; ImageSaveOptions options = new ImageSaveOptions(ImageSaveFormat.Tiff); options.PageCount = int.MaxValue; document.Save("Sample.tiff", options);Kurt Ambrose127 reputationPosted Aug 16, 2021, 10:12 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts