Posts

Showing posts with the label iTextSharp

Donate

Invalid nested tag div found, expected closing tag input

Hello all, I've been experimenting on how to print html document using the said 3rd party software called iTextSharp . iTextSharp is a popular tool and has several examples on the internet regarding integration to the project and occurring issues. One of the issue I encountered is Invalid nested div tag and is expecting a closing tag input . As I trace back my html source, the tags are well-formed except that they are self closing tags such as <input>, <hr>, <img>, <br> or the like. These tags when passed to an action method as string are not properly closed and thus an issue is thrown by iTextSharp's XMLWorkerHelper's ParseXHtml() method. <img src= "~/Images/success.png" /> <input type= "hidden" name= "OrderStatusHTML" /> <input type= "submit" id= "btnSubmit" value= "Export to PDF" class= "btn btn-success" /> The solution I came up with is to fi

Donate