HTML string to PDF - display:none style is not honored

Hi,


I am trying to export simple html string to PDF. I have used following code to generate the PDF.

//----------------------------------------------
String html = "<input type=‘text’ ID=‘FirstName’ runat=‘server’ style=‘display:none’ value=‘test’> ";
HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();
Document doc = new Document(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(html)), htmlLoadOptions);
//Save PDF file
doc.Save(“c:/pdftest/output.pdf”);
//---------------------------------------------

In the html I want to hide the input control so I set the display property to none but after generating the PDF input control is displayed on PDF. It seems that display: none is not working for input types but for span display:none’ style is working as expected.

Please suggest us the way (workaround solution) to fix this issue.

Also find attached AsposeHTML2PDF.zip contains sample application to reproduce this issue.

Thanks

Hi Dennis,

Thanks for your inquiry. I have tested your scenario with shared code and noticed the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-40376 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.

<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:Calibri;color:#333333;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>Best Regards,

Hi,


Is there any update on this issue, what is the ETA to fix this issue (in which release)?

Thanks

Hi Dennis


Thanks for your inquiry. I am afraid your issue is still not resolved as we have recently noticed the issue and it is still pending for investigation in the queue with other issues, reported earlier. As soon as our product team completes the investigation of the issue then we will share any ETA/findings. We will keep you updated about the issue resolution progress.

We are sorry for the inconvenience.

Best Regards,