Formatting issue while converting HTML to PDF

Hello,

We are using aspose for conveting HTML to PDF. In attached scenario, PDF file formatting is not remain same as HTML. The output PDF format is the worst.

Below is source code and attached input HTML file:

byte[] pdfData = null;
string TempFilePath = string.Empty;
string TempFolderPath = System.Web.HttpContext.Current.Server.MapPath("~/TempDir/");

            if (!Directory.Exists(TempFolderPath))
            {
                Directory.CreateDirectory(TempFolderPath);
            }

            TempFilePath = Path.Combine(TempFolderPath, Guid.NewGuid().ToString() + DateTime.Now.ToString("dd-MM-yyyy__hh_mm_ss") + ".pdf");
            
            Aspose.Pdf.HtmlLoadOptions objLoadOptions = new Aspose.Pdf.HtmlLoadOptions();
            objLoadOptions.PageInfo.Margin.Bottom = 10;
            objLoadOptions.PageInfo.Margin.Top = 20;

            //Load HTML string into MemoryStream using Aspose document class
            Aspose.Pdf.Document doc = new Aspose.Pdf.Document(new MemoryStream(Encoding.UTF8.GetBytes(html)), objLoadOptions);
            //Save PDF file on local hard drive or database or as you wish          
            doc.Save(TempFilePath);

            pdfData = File.ReadAllBytes(TempFilePath);

Input HTML.zip (1.4 KB)

@serversupport

Thank you for contacting support.

We have logged a ticket with ID PDFNET-47207 in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-47207) have been fixed in Aspose.PDF for .NET 22.12.