Browse our Products

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.


Docs Swagger Examples Blog Release Notes Support Dashboard

Installation

The package is available at nuget.org and it can be installed via package manager console by executing following command:

PM> Install-Package Aspose.HTML-Cloud

Version NuGet NuGet-GroupDocsCloud


Aspose.HTML Cloud SDK for .NET

Aspose.HTML Cloud SDK for .NET provides a robust solution for processing HTML documents and acts as a C# wrapper around the REST API, taking on numerous low-level operations: authentication, endpoint management, request/response handling, etc. Currently, the Cloud SDK offers a number of key features:

  • Convert HTML and HTML-based documents to various other formats.
  • Vectorize images.
  • Check web accessibility.

Convert HTML, MHTML, XHTML, EPUB, Markdown, and SVG

  • Convert HTML & XHTML to PDF, DOCX, XPS, MHTML, Markdown, and images.
  • Convert MHTML, EPUB, Markdown, and SVG to PDF, XPS, images, etc.
  • Process input from local files, URLs, or cloud storage.
  • Adjust advanced options such as page setup, resolution, etc.
  • Capture web page snapshots as images.
  • API support for advanced, automated workflows.

Image Vectorization

  • Convert raster images to SVG vector graphics.
  • Create high-quality vector images from low-resolution sources.
  • Adjust vectorization settings for precise results.

Check Web Accessibility via REST API

  • Validate the accessibility of HTML documents according to WCAG standards.
  • Ensure content accessibility for all users, including people with disabilities.
  • Test HTML from URLs, raw content, base64 data, or files in Aspose Cloud Storage.

Supported File Formats

Format  DescriptionLoadSave  Remarks
HTMLHTML format✔️✔️
XHTMLHTML with XML syntax✔️✔️Save option is only available when the input file is XHTML
MHTMLMHTML (Web archive) format✔️✔️Save option is only available for an MHTML document saving
EPUBE-book file format✔️
MDMarkdown Format✔️✔️Save option is only available for an HTML document saving
PDFSaves a document in PDF format✔️
XPSSaves a document in XPS (XML Paper Specification) format✔️
DOCXSaves a document in DOCX format✔️
TIFFRenders a page or pages of a document into TIFF✔️
JPEGRenders a page of a document and saves it as a JPEG file✔️
PNGRenders a page of a document and saves it as a PNG file✔️
BMPRenders a page of a document and saves it as a BMP file✔️
GIFRenders a page of a document and saves it as a GIF file✔️

Get Started with Aspose.HTML Cloud

1. Create a Free Account

  • Visit Aspose Cloud to sign up.
  • After successful signup, you’ll be redirected to the dashboard.

2. Manage Your Account

  • Access Account Settings by clicking the profile icon at the top right.
  • Update your profile, security, and billing details.
  • Save changes after editing.

3. Create a New App & Default Storage

  • Log into the Dashboard and go to the Applications page.
  • Click Create New Application, name it, and add a description.
  • For storage, click the “+” next to Default Storage, select storage type, and follow the instructions to set it up.

4. Get Your Client ID & Client Secret

  • In the Applications page, click on your newly created app (e.g., “My First App”).
  • View your Client ID and Client Secret—these are essential for API authentication.

5. Install & Use the SDK

  • You don’t need to install anything manually. Simply execute the following command in the Package Manager Console of Visual Studio to fetch and reference Aspose.HTML Cloud SDK:

    PM> Install-Package Aspose.HTML-Cloud
    
  • If you already have the SDK and want to upgrade it to the latest version, execute:

    PM> Update-Package Aspose.HTML-Cloud
    

Convert HTML to PDF

Convert HTML documents into high-quality PDF format effortlessly using Aspose.HTML Cloud API.

// Initialize the HTML API with Client ID and Client Secret
var api = new HtmlApi("CLIENT_ID", "CLIENT_SECRET").ConvertApi;

// Convert an HTML document to PDF with default options
var result = await api.ConvertAsync("test.html", "output.pdf");

// Save the result locally or on cloud storage

Convert Web Page to MHTML

Easily convert a live webpage into MHTML format using Aspose.HTML Cloud API and save it locally.

// Initialize the HTML API with credentials
var api = new HtmlApi("CLIENT_ID", "CLIENT_SECRET").ConvertApi;

// Convert webpage from URL to MHTML and save to a local file
var result = await api.ConvertUrlAsync("https://example.com", "output.mhtml");

Convert HTML to Image

Convert HTML files to high-quality JPEG images with customizable settings.

// Initialize the HTML API
var api = new HtmlApi("CLIENT_ID", "CLIENT_SECRET").ConvertApi;

// Convert HTML document to JPEG format
var result = await api.ConvertAsync("test.html", "output.jpg");

// Save the resulting JPEG file

Convert HTML to DOCX

Seamlessly convert HTML content to DOCX, enabling users to create editable Word documents from web content.

// Initialize the HTML API
var api = new HtmlApi("CLIENT_ID", "CLIENT_SECRET").ConvertApi;

// Convert HTML to DOCX with default settings
var result = await api.ConvertAsync("test.html", "output.docx");

// Save the DOCX document locally or in cloud storage

Convert EPUB to PDF

Convert EPUB eBooks to PDF format for easy reading and sharing using Aspose.HTML Cloud API.

// Initialize the HTML API
var api = new HtmlApi("CLIENT_ID", "CLIENT_SECRET").ConvertApi;

// Convert EPUB to PDF
var result = await api.ConvertAsync("test.epub", "output.pdf");

// Save the PDF file locally or on the cloud

Vectorize Image using Cloud API

This example demonstrates how to vectorize a raster image (PNG) into an SVG file using the Aspose.HTML Cloud REST API in C#.

public async Task VectorizeImageSync()
{
    using (HttpClient client = new HttpClient())
    {
        // Add authorization header with your access token
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_ACCESS_TOKEN");

        // Define request body with vectorization options
        var requestBody = new StringContent(
            "{ \"InputPath\": \"https://example.com/image.png\", " +
            "\"Options\": { \"ErrorThreshold\": 30, \"MaxIterations\": 100, \"ColorLimit\": 16, \"LineWidth\": 1.5 } }",
            Encoding.UTF8, "application/json");

        // Send a POST request to the Aspose Cloud Vectorization API (synchronous endpoint)
        var response = await client.PostAsync("https://api.aspose.cloud/v4.0/html/vectorization/png/sync", requestBody);

        // Read response stream (contains the generated SVG)
        var fileStream = await response.Content.ReadAsStreamAsync();

        // Save the SVG output to a local file
        using (FileStream fs = new FileStream("output.svg", FileMode.Create))
        {
            await fileStream.CopyToAsync(fs);
        }
    }
}

Docs Swagger Examples Blog Release Notes Support Dashboard


 English