1 - After loading document from memory, you can move cursor
to any desired place in document and then insert content
for example HTML using DocumentBuilder.InsertHtml(“html string”) method.
2 - You can pre-process your html string as follows before passing it to Aspose.Words:
your html string goes here
Or alternatively use DOM
classes of Aspose.Words such as Style class
to build new styles and apply to newly inserted html content.
3 - Yes. The following three ways are supported
- When CSS styles are written inline (as a value of the style attribute on every element).
- When CSS styles are written separately from the content in a style sheet embedded in the HTML file.
- When CSS styles are written separately from the content in a style sheet in an external file such that the HTML file links the style sheet.
Some of the issues we notice is around alignment and spacing. Seeattached image and html used for example. Do you have any best practices for scenarios that involve converting from Html to word with Aspose or any suggestions on how to resolve our issues
Aspose.Words generally tries to mimic the behavior of MS Word. we have converted your html to docx format using MS Word 2016 and attached it here for your reference (see attached msw-2016.docx). However, for the sake of any corrections in Aspose.Words, we have logged this problem in our issue tracking system as WORDSNET-12808. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for any inconvenience.