Edit and save word document in browser

Ajay Kalidindi 41 Reputation points
2023-05-30T07:10:38.36+00:00

Hi,

Users can upload word document and those are saved in project folder.

My requirement is user can edit and save uploaded word document in browser. After save the word content need to export it as pdf.

I have tried to convert word document content to html and showing it in editor. But images and some alignments are not properly coming. I have used Syncfusion, Aspose but those not give me correct solution.

I have also checked for Microsoft apis but those need to be save file in cloud, in my requirement file must be save in project folder not in onedrive, sharepoint, cloud etc.

Any ideas will be appreciated.

Thanks,
Ajay.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,250 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 40,736 Reputation points
    2023-05-31T05:37:23.6+00:00

    My requirement is user can edit and save uploaded word document in browser

    Do you mean the same functionality like Office Online or Google docs?

    Large developer teams invest several personal years of development to implement it and you want to do the same by simply write some line of code? You are tough.


  2. QiYou-MSFT 4,306 Reputation points Microsoft Vendor
    2023-06-01T09:52:55.97+00:00

    Hi @Ajay Kalidindi

    At first I thought the most functional version of CKEditor could upload word files, but I later found out that it couldn't. In fact, the problem is that there is a problem in the process of converting the word file into an html file. I tried several methods and found a common problem: some Word features cannot be converted to HTML exactly.

    For example, I have an image in Word, and when it is converted to an HTML file, its tag is <img> but does not attach a positional style. The problem caused by this is that the image is not in the correct position. Similarly, there are some paragraph and font styles in Word that cannot be perfectly accurate and accurately replaced with HTML.

    Picture1

    Picture2

    Picture3

    So my advice here is this: there may be relevant packages that can achieve a perfect conversion. If you want to implement this function, you can refer to the source code of some open source conversion packages to modify some problems in the conversion process. But I think it's a very huge project.

    Best regards,

    Qi You


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments