Capture Full Webpage Screenshot using C#

This short guide explains how to capture full webpage screenshot using C#. It provides details on setting up the IDE, a list of programming steps, and sample code for taking an entire webpage screenshot using C#. You will get information to create custom output as per your requirements.

Steps to Capture Entire Web Page Screenshot using C#

  1. Set the IDE to use Aspose.HTML for .NET to take a screenshot of the full webpage
  2. Set the license to avoid any trial limitations of the product
  3. Specify the webpage whose screenshot is to be taken
  4. Load the source web page into memory
  5. Create the ImageSaveOptions object and set the output image type to PNG
  6. Set the horizontal and vertical resolution of the resultant image
  7. Render the webpage as an image using the ConvertHTML() method

These steps describe how to take a screenshot of an entire webpage using C#. Set the license, specify the webpage and load it into memory, and create the ImageSaveOptions class object. Finally, set the output image parameters and render the webpage as an image.

Code to Take Screenshot of Website using C#

This sample code demonstrates how to apply full webpage screen capture using C#. For capturing the full page, use page-layout fit options to capture the entire page instead of the default viewport. You may also try setting the background color of the image, setting a custom viewport size, and setting a network timeout for handling delays in loading the webpage.

This tutorial assists in taking snapshots of web pages. To convert Markdown to an image, refer to the article Convert Markdown to Word in C#.