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

Free Support Forum - aspose.com

Web Front end tool for aspose

We are using Aspose.word to generate word document on web server.

We are using KaramaSoft front end editor allowing users to copy and paste part of the word document and also manually adding content and formatting from asp.net web pages.

We are facing issues of inconsistencies when copy part of content from word.

For example, the word content contains bullets and sub bullets, the KaramaSoft displaying correctly. But when word generated using Aspose.Word on server, the sub bullets are missing.
--------------------------------------------Example of input content-----------------

Drop down list:

  • Comprehensiveness of strategic plan/vision documentation and communication to the organization; and/or
  • Alignment of strategic goals/objectives with management’s execution of the business strategy. and communication to the organization
    • This is a test
    • of the bullets

--------------------------------------------Example of content end-----------------
— Content HTML generated by Karamasoft ---------------------------------

Drop down list:
Comprehensiveness of strategic plan/vision documentation and communication to the organization; and/or
Alignment of strategic goals/objectives with management’s execution of the business strategy. and communication to the organization
This is a test
of the bullets
-----------------------END Content HTML generated by Karamasoft---------------
Can you suggest best front-end editor to input formatted content and also copy formatted content from web front-end which generates matching output word document using Aspose.word?

Appreciate your help.
Thank you
Akshay Patel

Hi Akshay,
Thanks for your inquiry. I have converted the shared Html to Word document using latest version of Aspose.Words for .NET 15.8.0 and have not found the shared issue. I have used the following code example to convert Html to Docx. I have attached the output document with this post for your kind reference.

LoadOptions options = new LoadOptions();
options.LoadFormat = LoadFormat.Html;
Document doc = new Document(MyDir + "in.html", options);
doc.Save(MyDir + "Out.docx");

Moreover, please note that Aspose.Words mimics the same behavior as MS Word does. If you convert your Html to Docx using MS Word, you will get the same output.
Aspose.Words for .NET is
just a class library and with it you can programmatically generate,
modify, convert, render and print documents without utilizing Microsoft
Word®. So, it does not offer any UI or web control for performing these
document processing tasks on web pages.
Our sister company GroupDocs.com offers a viewer app which
you may consider including in your application to view the various file
formats. With GroupDocs apps, you can also have limited editing
functionalities. For more information, I suggest you please contact
GroupDocs support through live chat or support forums of GroupDocs.
Please let me know if I can be of any further assistance.

Hello Tahir,
Thank you for quick reply.
We are facing multiple issues with formatting and missing content. I tried LoadOption.HTML and didn’t help.
Can you suggest best front-end editor for asp.net web pages allowing paste content from Word and works with Aspose,Word? We are using KaramaSoft.UltimateEditor and having many issues.
Thank you
Akshay Patel

Hi Akshay,
Thanks for your inquiry. In your case, I suggest you please load the Html into separate Document and insert it into target document using DocumentBuilder.InsertDocument method. Hope this helps you.

akshay.patel:
We are facing multiple issues with formatting and missing content. I tried LoadOption.HTML and didn’t help.

Please share following detail for investigation purposes.

  • Please attach your input Word document to which you are inserting the shared html contents
  • 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 share the output document showing the undesired behavior.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

akshay.patel:
Can you suggest best front-end editor for asp.net web pages allowing paste content from Word and works with Aspose,Word? We are using KaramaSoft.UltimateEditor and having many issues.

Please note that Aspose.Words accepts clean/standard HTML from any editor. You can google and check which editor fit for your requirements.

Hello Tahir,
I implemented following extension method based on your suggestions of using DocumentBuilder.InsertDocument most of the issues are resolved.
This was very helpful saved us lot’s of time.

Imports Aspose.Words
Imports Aspose.Words.Reporting
Imports Aspose.Words.Saving
Imports System.Runtime.CompilerServices
Module AsposeExtension
<Extension()>
Public Function InsertHtmlExt(builder As DocumentBuilder, ByVal HtmlContent As String) As DocumentBuilder
If (String.IsNullOrEmpty(HtmlContent) = True) Then
builder.InsertHtml("")
Else
Dim docSrcTmp As New Document()
Dim builderTmp As New DocumentBuilder(docSrcTmp)
builderTmp.InsertHtml(HtmlContent)
builder.InsertDocument(docSrcTmp, ImportFormatMode.KeepSourceFormatting)
End If
Return builder
End Function
End Module

The client call was updated to builder.InsertHtmlExt(htmlContent) instead of builder.InsertHtml(htmlContent)
Appreciate your help and close this issue.
Akshay Patel.

Hi Akshay,
Thanks for your feedback. It is nice to hear from you that your issue has been resolved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.