HTML file not converting to PDF

Hi,


I am using Aspose.PDF (7.2.0.0) to convert my HTML files to PDF. Below is a code piece that does this job.

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section sec1 = new Aspose.Pdf.Generator.Section(pdf1);
Aspose.Pdf.Generator.Text t2;

System.IO.StreamReader sr = new System.IO.StreamReader(@“D:\HTMLtoPDF\Sample.htm”);
string HTMLStirng = sr.ReadToEnd();

t2 = new Aspose.Pdf.Generator.Text(HTMLStirng);

t2.IsHtmlTagSupported = true;
if (sec1.PageInfo.PageWidth > Aspose.Pdf.Generator.PageSize.A4Width)
sec1.PageInfo.PageWidth = Aspose.Pdf.Generator.PageSize.A4Width;

if (sec1.PageInfo.PageHeight > Aspose.Pdf.Generator.PageSize.A4Height)
sec1.PageInfo.PageHeight = Aspose.Pdf.Generator.PageSize.A4Height;

sec1.Paragraphs.Add(t2);
pdf1.Sections.Add(sec1);

for (int i = 0; i < pdf1.Sections.Count; i++)
{
pdf1.Sections[i].PageInfo.Margin.Left = 0;
pdf1.Sections[i].PageInfo.Margin.Right = 0;
pdf1.Sections[i].PageInfo.Margin.Top = 0;
pdf1.Sections[i].PageInfo.Margin.Bottom = 0;

pdf1.Sections[i].TextInfo.Alignment = Aspose.Pdf.Generator.AlignmentType.Center;
}

pdf1.Save(@“D:\HTMLtoPDF\newPDF.pdf”);

Code works fine for all of the HTML files except the attached one.

The attached HTML renders perfect in all browsers.

Is there any design issue in HTML / requires any change in my conversion code piece ?

Hi there,

We are sorry for the inconvenience caused. While testing the scenario with the latest version of Aspose.Pdf for .NET 9.3.0, we have noticed that HTML form fields are not being rendered properly in resultant PDF and logged it in our bug tracking system as PDFNEWNET-37066 for further investigation and resolution. We will notify you via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,

Thank you Tilal.

Is there any update on PDFNEWNET-37066 ?

Hi there,


Thanks for your inquiry. I am afraid your reported issue is still not resolved due to other priority tasks. However we have requested our development team to complete the investigation and share an ETA at their earliest. We will keep you update about the issue resolution progress via this forum thread.

We are sorry for the inconvenience caused.

Best Regards,

Any update on this? We are going on 9 months with this issue still existing and our customer cannot perform their day to day functions properly without this fixed.

Hi Toby,


Thanks for your inquiry. I am afraid you reported issue is still no resolved. We have recorded your concern and requested our development team to share an ETA at their earliest. We will let you know as soon as we get at feedback.

Thanks for your patience and cooperation.

Best Regards,

Hi Toby,


Adding more to Tilal’s comments, as requested in other forum thread, the priority of this problem has been raised to Priority Support and now it has high precedence in terms of investigation. As soon as we have some definite news regarding its resolution, we will let you know.

The issues you have found earlier (filed as PDFNEWNET-37066) have been fixed in Aspose.Pdf for .NET 10.5.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.