I am trying to figure out how to create a protected rich form in a DOCX file from Aspose Words 20.5 for java.
Right now my inherited code base creates a document with read only sections and normal sections for the form and the fields respectively. The problem we have ran into is our users are still able to add content at the end of the document.
The solution I was trying is to use the protection code that aspose provides to set the protections on the document. (This may not be the best solution to my problem above so I am open to other solutions).
I was able to set doc.protect(ProtectionType.ALLOW_ONLY_FORM_FIELDS) on my document and I was also able to call section.setProtectedForForms(false) on each of the rich text sections on my form that the user should be able to edit.
Problem I am running into is the generated documents are showing up as read only in word. I am unable to edit the contents of the unprotected sections at all.
I suspect I might have messed something up on my end. If there are any guides that i missed for working with Aspose Words I would appreciate them.