I am following @JasonPlutext's approach to edit word document on browser from here docx-html-editor. The code here maintains http session and saves design and formatting information in session cookie throughout the entire roadtrip (docx-html-docx) process.
My requirement is I don't want to depend on http session and want to save paragraph design information in local storage.
I tried following ways to achieve it:
serializing instance of WordProcessingMLPackage and retrieve it later, but as this class is very huge bucket of information of various types, I couldn't find any way to serialize it.
I tried to marshal only required user data (Ex. {"DOCX4J_EDITOR:p75": <-instance of PPr->}). I used javax.xml.bind.JAXBContext and javax.xml.bind.Marshaller for it but it gives the following error:
There's no ObjectFactory with an @XmlElementDecl for the element {http://schemas.microsoft.com/office/word/2012/wordml}dataBinding.
My question is what is best way to save design information of paragraphs and retrieve them later.