How to Screenshot a Website Link in .NET Core

Install-Package Cloudmersive.APIClient.NETCore.DocumentAndDataConvert -Version 2.2.1
using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NETCore.DocumentAndDataConvert.Api;
using Cloudmersive.APIClient.NETCore.DocumentAndDataConvert.Client;
using Cloudmersive.APIClient.NETCore.DocumentAndDataConvert.Model;
namespace Example
{
public class ConvertWebUrlToScreenshotExample
{
public void main()
{
// Configure API key authorization: Apikey
Configuration.Default.AddApiKey("Apikey", "YOUR_API_KEY");
var apiInstance = new ConvertWebApi();
var input = new ScreenshotRequest(); // ScreenshotRequest | Screenshot request parameters
try
{
// Take screenshot of URL
byte[] result = apiInstance.ConvertWebUrlToScreenshot(input);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ConvertWebApi.ConvertWebUrlToScreenshot: " + e.Message );
}
}
}
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store