Hi,
I have a HTML file for conversion to Docx but it is not following strict XHTML rules and i want to still produce/Convert it to docx using Syncfusion.DocIO library.
What would be the settings to convert any HTML file (if it renders in browser) then it should produce the Docx.
And if possible please share a sample code of it. i have attached my sample code.
Thanks in anticipation
|
XmlDocument m_xmlDoc = new XmlDocument(); FileStream fileStream = new FileStream(@"testalignment.html", FileMode.Open); XmlReader reader = XmlReader.Create(fileStream); m_xmlDoc.Load(reader); reader.Close(); |
|
<html> <body> This is the text for page #1. <br style="page-break-before: always"/> Page #2... <br style="page-break-before: always"/> <br /> Page #3... </body> </html> |
Thanks for response.
I want to ask you one more question. what is the purpose of XHTMLValidationType.None. i have set None but its still validate my html. i want to know that how i do this the library not validate my html code. in all type None,Strict,Transitional its through the error.
is there any option in this
library how to successfully converted html to docx with not validate html.
Thanks