title: Problem checking pdf flags pdfAnnotation.HasFlag error
body: <p>I am working on a tool that checks PDF annotations. I am able to check the flags but I am getting a error on one particular flag. What could be the cause?</p>
  
  <pre><code>    Public Sub GetComments()
  
      Dim oComments As New PDFcomments
      Dim reader As PdfReader = New PdfReader("C:\Users\jeee\Desktop\1_3047 - Type 1.pdf")
      Dim pdfdocument As New PdfDocument(reader)
  
  
      For i As Integer = 1 To pdfdocument.GetNumberOfPages
  
          Dim pdfPage As PdfPage = pdfdocument.GetPage(i)
          Dim oAnnotations As IList(Of Annot.PdfAnnotation) = pdfPage.GetAnnotations()
  
  
          For Each oAnnotation As Annot.PdfAnnotation In oAnnotations
  
              Dim oAnnotationSubType As PdfName = oAnnotation.GetSubtype
  
              If oAnnotationSubType.ToString = "/FreeText" Then
                  Debug.Print(oAnnotation.GetTitle.ToString)
                  Debug.Print(oAnnotation.GetContents.ToString)
                  Debug.Print(oAnnotation.GetFlags)
  
                  Debug.Print(oAnnotation.HasFlag(1))
                  Debug.Print(oAnnotation.HasFlag(2))
                  Debug.Print(oAnnotation.HasFlag(3))
                  Debug.Print(oAnnotation.HasFlag(4))
  
              End If
  
          Next
      Next
  
  End Sub
  </code></pre>
  
  <blockquote>
    <p>System.ArgumentException: 'Only one flag must be checked at once.'</p>
  </blockquote>
  
  <p>Line that causes the error: <code>Debug.Print(oAnnotation.HasFlag(3))</code></p>
  
  <p>Debug results.</p>
  
  <blockquote>
    <p>JeEe 
    Test annotation
    4 
    False 
    False</p>
  </blockquote>
  
  <p>Note: if I put the line <code>Debug.Print(oAnnotation.HasFlag(4))</code> in front of <code>Debug.Print(oAnnotation.HasFlag(3))</code> the error occurs still on the same line.</p>