Merge HTML in C#

Merge HTML files with a cross-platform .NET API.

Merge HTML to HTML using Aspose.Slides

Aspose.Slides for .NET lets you create, convert, merge, and manipulate presentations, HTML files, and other documents. When you merge HTML files, you combine content from multiple HTML documents and save it as one HTML file while preserving presentation content and formatting.

Merge HTML to HTML in C#

Using Aspose.Slides for .NET , you can load HTML content into a Presentation object and save the result as an HTML file.

C# code for merging HTML to HTML

using var presentation = new Presentation();
presentation.Slides.RemoveAt(0);
presentation.Slides.AddFromHtml(File.ReadAllText("page1.html"));
presentation.Slides.AddFromHtml(File.ReadAllText("page2.html"));
presentation.Save("merged.html", SaveFormat.Html);

How to merge HTML in C#

  1. Install Aspose.Slides for .NET. See Installation .

  2. Add the library as a reference in your project.

  3. Create a Presentation object.

  4. Load the HTML files with Slides.AddFromHtml.

  5. Save the merged file with SaveFormat.Html.

Merge HTML Files Online

Combine files online with Aspose.Slides Merger.

Merge other files

You can also combine files in other formats to get a single file