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 Sep 07, 2016 11:13 am

We are currently using trail version of Spire.Net Word utility in our application for Word to HTML and after processing HTML file back from HTML to Word file.

What we are doing right now is, we are uploading a word file to the application and converting it to HTML file to process it further. From process I mean, we are editing(updating text, inserting images, formatting etc) this HTML file using editor in the application and saving back to the server. Once user finished editing, user will download the latest HTML file in word format.

Till now everything is just working fine, the issue arises when there are images or some objects are embedded into the word file or we are inserting through editor in HTML. When we convert the HTML with images to Word then it does not show anything except a big cross image into the word file.

As you can see Festivals of india.docx is the original file with images and the second one with date in the name is the latest downloaded file from server which was converted from HTML to Word.

I have a folder location where the converted HTML files kept with the images folder.

I am using below code for HTML to Word conversion –
Spire.Doc.Document document = new Spire.Doc.Document();
document.LoadFromFile(FilePathHTML, FileFormat.Html, XHTMLValidationType.None);
document.HtmlExportOptions.ImageEmbedded = true;
document.SaveToFile(FilePathTemp, FileFormat.Docx);

and for Word to HTML –
Spire.Doc.Document document = new Spire.Doc.Document();
document.LoadFromFile(FileName.ToString());
//Save doc file to html
document.SaveToFile(HtmlDirectoryPath.ToString(), FileFormat.Html);

One more issue I have noticed, the converted Word document is losing the Bold functionality. If you can see into the converted document, it lost the bold text from the document.

I am using below version of the Spire.Net
packages\Spire.Doc.5.7.54\lib\net40\Spire.Doc.dll

pratap.singh@elevateservices.com
 
Posts: 1
Joined: Tue Aug 02, 2016 11:03 am

Thu Sep 08, 2016 8:17 am

Hi,

Thanks for your inquiry. We have converted the document as you have done, but there is no issue. The following is the document that we got from converting document, and could you please provide your html document for looking into the issues.

Sincerely,
Alan
E-iceblue support team
User avatar

Alan.Li
 
Posts: 35
Joined: Mon Sep 05, 2016 2:51 am

Return to Spire.Doc

cron