Conversion of pdf to html producing very large size

conversion of pdf to html producing very large size, attaching the files for reference (input and output).
We are using aspose PDF 19.11
How can we reduce the converted file size.ref.zip (1.1 MB)
?

@yatheendra

Can you please share which API - .NET or Java - are you using so that we can further proceed to assist you accordingly.

We are using Java 8

@yatheendra

Would you please try using below code snippet with 23.6 version of the API and let us know in case you still notice any issues? We have noticed that the output HTML size was 676KB. ref.zip (1.1 MB)

Document doc = new Document(dataDir + "input.pdf");
HtmlSaveOptions newOptions = new HtmlSaveOptions();
newOptions.setPartsEmbeddingMode(HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml);
// this is just optimozation for IE and can be omitted
newOptions.setLettersPositioningMethod(LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss);
newOptions.setRasterImagesSavingMode(HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground);
newOptions.setFontSavingMode(HtmlSaveOptions.FontSavingModes.SaveInAllFormats);
newOptions.setRemoveEmptyAreasOnTopAndBottom(true);
doc.save(dataDir + "output.html", newOptions);