How To Convert HTML Page To BMP Image? RRS feed

  • Question

  • Hello. What is needed to convert HTML page to BMP image programmatically? Thank you.
    Monday, January 17, 2011 1:38 AM



    Hi ASM,

    This article (http://www.codeproject.com/KB/IP/htmlimagecapture.aspx )tells about how to capture HTML document as images. The following is the introduction of this article:

    My application allows limited editing of HTML pages using MSHTML. Each HTML page is based on a template file and the range of things the end user can do to that template file is limited. At no time is the user able to create an empty HTML page.

    So obviously there has to be a mechanism in my application to allow the user to select which template a new page should be based on.

    I wanted to present the user with a list of thumbnail images, each representing a template page. In order to do that I had to devise a way of taking an HTML page and converting it to an image. The alternative of presenting the user with a simple listbox with the names of the templates is a tad too early 90's.

    You can download the source code from this article.


    If you have solved your issue, please mark the useful reply as answer.

    Best regards,


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by ASM C CPP Tuesday, January 18, 2011 3:53 AM
    Tuesday, January 18, 2011 3:09 AM