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.

Fri Oct 31, 2014 11:13 am

Hi,
I have an html file(Html in the attachments) that i save as docx file using LoadFromStream method, and then i save it using savetofile method with format docx.
I have a table in the html, the table is saved in docx file but some cells have not been correctly saved with right height.

I attached the html and docx files.

Thank you for your help.
Last edited by tarikzaid on Mon Nov 03, 2014 9:38 am, edited 1 time in total.

tarikzaid
 
Posts: 29
Joined: Wed Aug 06, 2014 7:16 am

Mon Nov 03, 2014 2:10 am

Dear tarikzaid,

Thanks for your inquiry.

I used Spire.Doc v5.2.65 to test and it work well, please try it.
Here are the code snippet I used:
Code: Select all
Document doc = new Document();
doc.LoadFromStream(File.OpenRead("Html.html"), FileFormat.Html, XHTMLValidationType.None);
doc.SaveToFile("Result.docx", FileFormat.Docx2010);

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Nov 12, 2014 11:14 am

Hello,
Thank you for your reply.
There are two kinds of views : print and web layout. The web layout is ok, but the print layout is not ok.

Have you check the print layout also ?

Thank you.

tarikzaid
 
Posts: 29
Joined: Wed Aug 06, 2014 7:16 am

Thu Nov 13, 2014 1:42 am

Dear tarikzaid,

I noticed that the issue occured in print layout and I have posted it to our dev team, we will inform you if there is any update.

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Nov 13, 2014 3:08 am

Dear tarikzaid,

I got news from dev team when you converted html to word, the result document would display as web layout view. If you change it to normal (page view), the contents inside the document would change. So there are two ways to resolve this issue from our dev team:
1) Resize the cell manually after the conversion.
2) Set height (in "px") to the td tags.

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Tue Nov 18, 2014 8:51 am

Dear tarikzaid,

Have you tried the solution I provided? Did it work?

Please give us some feedback if convenience.

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.Doc