Preserving word document formatting - footnotes, end notes everything while rewriting via code

23 views Asked by At

I have python code. I am using docx lib to work on word document currently.

I am fetching the text from word document and sending it to AI for some processing. After processing happen I want to rewrite the returned text from AI API back in to new word file. While rewriting the text I want to preserve all the formatting specially footnotes, end notes, hyperlinks ex. master thesis documents or technical paper.

The changes in text is visible as tracking so that's not issue. How to achieve above preservation.

Which language and libraries will be useful? Any other coding language lib suggestion is fine.

0

There are 0 answers