title: How to Check PDF is Reader enabled or not using C#?
body: <p>My only requirement is to find a selected pdf in a folder is Reader enabled or not, more specifically if usage rights are defined in a way that allows people to add annotations (e.g. comments).</p>
  
  <p>I am doing this in windows application. If I click a button, an event is triggered searching a folder for PDF files. This event needs to check whether or not the PDFs in the folder are Reader enabled for comments. If they are, I need to remove the comment usage rights or revert the PDF back to its original version.</p>
  
  <p>My code can only find PDF files in the folder. I don`t know how to check if the selected PDF is comment enabled or not. Please be gentle and suggest solution.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      {
          string[] filePaths = Directory.GetFiles("D:\\myfolder\\pdffolder");
          List&lt;ListViewItem&gt; files = new List&lt;ListViewItem&gt;();
          foreach (string filePath in filePaths)
          {
              ---need to check comment enabled or not---
          }
      }
  }
  </code></pre>