ProtectedForForms property is always true for sections

Hello

I have a simple file with 2 sections. The protection is turned off. But ProtectedForForms is always true when I load document using Aspose.Words.

Is it an issue?


This Topic is created by tilal.ahmad using the Email to Topic plugin.

Hi there,

Thanks for your patience. In reference to your post, our product team has investigated the logged issue WORDSNET-15449 and found it is not a bug.

According to ECMA376, p4, 2.6.6 this property has value ‘true’ by default and the enforcement of this property is determined by the documentProtection element (§2.15.1.28), as it is possible to specify protection without turning it on.

So, it is expected AW behavior and to achieve the desired result you should check both protection properties. We are closing issue as “Not a Bug”

Document doc = new Document("Simple+text+2.docx");
            
bool isDocumentProtected = (doc.ProtectionType != ProtectionType.NoProtection);

foreach (Section section in doc.Sections)
{

    bool isSectionProtected = isDocumentProtected && section.ProtectedForForms;

    Console.WriteLine(isSectionProtected);

}

Best Regards,