Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Aug 15, 2018 2:59 pm

Hello All,

I've a html file which I'm trying to save to Docx with the styles but couldn't make it work. Can you please help me with this?

Code:

Code: Select all
 var document = new Spire.Doc.Document();
            document.LoadFromFile(@"C:\Test\Data\Summary.html", Spire.Doc.FileFormat.Html, XHTMLValidationType.None);
            document.SaveToFile(@"C:\Test\test.docx", Spire.Doc.FileFormat.Docx);


HtmlScreenshot.JPG


WordScreenshot.JPG


I'm using all the latest spire dll's with license. Appreciate your immediate help.

Thanks,
Santhoshi.

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Wed Aug 15, 2018 4:21 pm

Hello All,

We have the same issue. Looking for immediate assistance.


Thanks,
Manoj.

mturumella
 
Posts: 21
Joined: Fri Jan 22, 2016 2:28 am

Thu Aug 16, 2018 8:03 am

Hello,

Thanks for your inquiry.
Sorry that our Spire.Doc doesn't support parsing this style. Our product is based on MS Word, you could open the html by MS Word directly, the style is also missing.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Aug 16, 2018 8:56 am

Hi Lisa,
Thanks for your reply.
Do you mean the <style> tag doesn't work? Or any specific cas property doesn't work?

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Thu Aug 16, 2018 10:39 am

Hello Santuvssantu,

There are some specific css properties don't work in Word. Generally, our Spire.Doc supports the styles that MS Word supports.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.Doc