How to convert HTML to TIFF in C#
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How to convert HTML to TIFF in C#

  1. #1
    Join Date
    Jun 2009
    Posts
    2

    Post How to convert HTML to TIFF in C#

    Hello,

    Do you have an code example of how i can convert a html page to TIFF?

    Thanks

  2. #2
    Join Date
    May 2011
    Location
    Washington State
    Posts
    220

    Re: How to convert HTML to TIFF in C#

    Are you hosting the browser? If so... just capture your form image and save it as TIFF...

    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); 
    }
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center