We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert HTML to Word

I am a asp.net programmer. Now I have a project is about print users to upload documents.

1:Users upload documents,server save and convert to independent HTML file.
2:Read independent HTML file and save in the database.(May be aspose support the word each page convert to string and don’t save HTML file. )
3:Get HTML code from database and show it on HTML editor,Users may be change som things,at last save in database.
4:Get all HTML code and convert to one word(Used to print).


But now,I have some question,the word save to HTML file is very good, the problem is converted back to word format.

Do you have any good idea?

Hi there,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple application (for example a Console
    Application Project
    ) that demonstrates the code (Aspose.Words code) you used to generate
    your output document

  • Please attach the output HTML file that shows the undesired behavior.

Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

I upload the demo ConvertDocument.zip .

I am a china programmer.May be the word in your computer unable to display normal.
There is the problem of my screenshot in \bin\Debug\Source File *.png

1.Users upload word file in my website.
2.Convert the word each page to independent HTML file.
3.User may modify the HTML page content ,and save in database.
4.Merge and convert HTML file to word file or pdf file.The converted file is used to print.

Hi there,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you convert the output HtmlFixed to Word document using MS Word, you will get the same output.

Moreover, u
pon
processing HTML, some features of HTML might be lost. You can find a
list of limitations upon HTML exporting/importing here:
http://www.aspose.com/docs/display/wordsnet/Load+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format
http://www.aspose.com/docs/display/wordsnet/Save+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format

In your case, I suggest you please convert the input word document to html instead of HtmlFixed. Please use PageSplitter code example to split each page of Word document to HTML. Please check “PageSplitter” example project in Aspose.Words for .NET examples repository at GitHub.

I have merged PageSplitter code in your shared console application. Please check the attached console application for your kind reference.

Hope this helps you. Please let us know if you have any more queries.

Thank you very much.It is very good for PageSplitter code.

1. I want save Images in the other folder ,used HtmlFixedSaveOptions or HtmlSaveOptions i know how to save Image in the other folder.But use PageSplitter i have no idea.


2.And Convert HTML file to word file or pdf file.but Images not work.


3. Now each html bottom have a number ‘1’ . How remove it.