Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conholdate-gists/c93008180c287d2c0e630c3a87099946 to your computer and use it in GitHub Desktop.
Save conholdate-gists/c93008180c287d2c0e630c3a87099946 to your computer and use it in GitHub Desktop.
HTML to Documents & Images Conversion in C# .NET

Convert HTML to 100+ Documents & Image Formats in C#

Native C# .NET documents conversion APIs to convert from HTML and other web formats to images and 100+ document formats including OpenDocument, Microsoft Word, Excel, PowerPoint HTML, Photoshop and many more.

The below C# code examples demonstrates how to convert HTML files to images, Excel spreadsheet, PowerPoint presentation and Word processing document formats.

View a list of all supported document conversion file formats https://docs.groupdocs.com/conversion/net/supported-document-formats/

Installation

Download GroupDocs.Conversion & GroupDocs.Viewer assemblies from https://downloads.conholdate.com/total/net or install the whole package directly from NuGet https://www.nuget.org/packages/Conholdate.Total/ into your workplace.

More About Conholdate.Total for .NET APIs

Home | Product Page | Docs | New Releases | API Reference | Examples | Blog | Free Support | Temporary License | About Us

// Supports converting documents between Word, Excel, PowerPoint, Project, Images, Web, Email, Metafiles and Diagram file formats.
// Supported file formats: https://docs.groupdocs.com/conversion/net/supported-document-formats/
using (Converter converter = new Converter("input.html"))
{
var convertOptions = converter.GetPossibleConversions()["docx"].ConvertOptions;
converter.Convert("output.docx", convertOptions);
}
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources("output{0}.html");
using (Viewer viewer = new Viewer("output.docx"))
{
viewer.View(viewOptions);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment