public class AsposeProtectDoc
{
public static void main(String[] args) throws Exception
{
Document doc = new Document("data/document.doc");
doc.protect(ProtectionType.READ_ONLY);
// doc.protect(ProtectionType.ALLOW_ONLY_COMMENTS);
// doc.protect(ProtectionType.ALLOW_ONLY_FORM_FIELDS);
// doc.protect(ProtectionType.ALLOW_ONLY_REVISIONS);
doc.save("data/AsposeProtect.doc", SaveFormat.DOC);