Hi Spire Support Team,
We are using Spire.PDF.NETCore 7.12.1 for converting PDF files to HTML in our ASP.NET application.
We are currently facing issues where the generated HTML does not preserve the original PDF styles and layout correctly.
We are using the following code for conversion:
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile(inputFile);
pdf.ConvertOptions.SetPdfToHtmlOptions(true, true);
pdf.SaveToFile(outputFile, Spire.Pdf.FileFormat.HTML);
string html = await File.ReadAllTextAsync(outputFile);
We have attached a sample PDF and generated HTML output for your reference.
Please let us know the best approach to achieve accurate PDF-to-HTML rendering.