File Size Increase on Conversion to HTML – GroupDocs for .NET

Hello Team,

I am using GroupDocs.Conversion in a .NET Core application to convert document files (e.g., Word, Excel) to HTML for preview purposes. However, I have noticed that the converted HTML files are significantly larger than the original documents.

For example:

  • A 10MB Excel file is converted into a 45MB HTML file.
  • A 7MB Word document is converted into a 16MB HTML file.

I would like to know:

  1. Is there any way to reduce the file size while converting documents to HTML?
  2. Does GroupDocs provide any built-in file compression options for HTML conversion?

Here is the code snippet I am currently using for the conversion:


using (Converter converter = new Converter(documentPath))
{
var options = new WebConvertOptions();
converter.Convert(outputFilePath, options);
}


Details:

GroupDocs.Total Version - “25.2.0”

.Net Version - “8.0”

Could you please provide guidance on how to optimize or compress the HTML output?

@koc-it-support

We couldn’t reproduce this issue at our end using sample 32MB Word file. The converted/resultant HTML is only 9MB. Please take a look at this screenshot.

Please share following details and we’ll further investigate scenario:

  • Do you face this issue for every large source file? Or it happens for some specific files?
  • Problematic/source and output files (upload them to some cloud storage e.g. Google Drive and share link here)

There’s no built-in compression feature/option available. However, if you could provide us the concerned files we can further look into it.

Hello Team,

Can you please try converting the sample files I have shared in this drive link: HTML Conversion Samples.zip?

  • I have included an Excel file (10MB), which is converting into a 45MB HTML file.
  • Another document file (7MB) is converting into a 17MB HTML file.

The ZIP file contains both the source files and the corresponding converted HTML files.

Could you please try converting these files on your end and share the exact code and settings you are using in .NET Core for the conversion?

Looking forward to your response.

@koc-it-support
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): TOTALNET-205

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.