How to save annotations back to docx file?

Product: @pdftron/webviewer

Product Version: “^8.0.0”

Please give a brief summary of your issue: Want to save annotations back to docx file.

Please describe your issue and provide steps to reproduce it:
I want to load docx and pdf format file in the webviewer. I don’t have any issue in loading the file in the viewer. I made annotations and tried to save the file. We are able to achieve it using pdf file, but in the docx file annotations are not getting saved.

Please provide a link to a minimal sample where the issue is reproducible:

In the below sample:
1.Replace the initialdoc value with local docx file( We can place it in the client folder).
2.Provide the appropriate name to save the docx file.
3.Right click and make annotations ,then click on save button.
4.we are getting alert as “Annotations saved to the document”, but actually its not overwriting the file.

Note: I am trying to implement this in the React application. I tried to convert the doc to pdf with the below code, but I am not able to do that too.
const PDFNet = instance.PDFNet
const pdfdoc = await PDFNet.Convert.office2PDF(data) ;

Hello Nethaji,
Welcome to the PDFTron Community Forum!

Currently we do not support having annotations in .docx files, however you can annotate a .docx file then save it as a .pdf file and the annotations will be saved.

To convert from Office to PDF, you can follow our guide here: https://www.pdftron.com/documentation/web/guides/office/convert-office/

Best Regards,
Tyler Gordon
Web Development Support Engineer
PDFTron Systems, Inc.
www.pdftron.com

Hello Nethaji,

To better understand your workflow and gather information about this topic, can you provide answers to these questions:

  1. Why does the workflow require annotations being saved back to the .docx file?
  2. Since this option is currently unavailable, how are you handling this workflow?

Best Regards,
Tyler Gordon
Web Development Support Engineer
PDFTron Systems, Inc.
www.pdftron.com

Hello Pdftron Team,

I am trying to save annotations on docx file on multiple pages but I was able to achieve it only for the first page…the same code has been used for pdf and it was successful.

Does, Docx supports importing and exporting annotations?