title: value of type 1-dimensional array cannot be converted to system.collections.bitarray
body: <p>I have a function to create a pdf which should return bitarray. Below is the code</p>
  
  <pre><code>Public Function GenPDF() As BitArray
          Dim pdfdoc1 As BitArray
  
          Dim doc As New Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35)
          Try
              Dim MemStream As New MemoryStream
              Dim wri As PdfWriter = PdfWriter.GetInstance(doc, MemStream)
              'Open Document to write
              doc.Open()
  
              'Write some content
              Dim paragraph As New Paragraph("This is my first line using Paragraph.")
              Dim pharse As New Phrase("This is my second line using Pharse.")
              Dim chunk As New Chunk(" This is my third line using Chunk.")
              ' Now add the above created text using different class object to our pdf document
              doc.Add(paragraph)
              doc.Add(pharse)
              doc.Add(chunk)
              pdfdoc1 = MemStream.GetBuffer()
          Catch dex As DocumentException
  
  
              'Handle document exception
  
          Catch ex As Exception
              'Handle Other Exception
          Finally
              'Close document
              doc.Close()
  
          End Try
  </code></pre>
  
  <p>But it is throwing an error at this line pdfdoc1 = MemStream.GetBuffer() 
  value of type 1-dimensional array cannot be converted to system.collections.bitarray
  Please help</p>