title: Getting pdf signatures with iText7
body: <p>I have a scenario where I need to get signature information from a pdf with the iText7 library.  The signature may or may not exist. When I instantiate a new <code>SignatureUtil</code> object for a PDF that does not have any digital signatures I get the exception </p>
  
  <blockquote>
    <p>"There is no associate PdfWriter for making indirects."</p>
  </blockquote>
  
  <p>. If an signature is there it works fine.  I'm not sure how to correct this exception.</p>
  
  <p>UPDATED to include code sample</p>
  
  <pre><code>Using reader As New PdfReader(pdfPath),
              pdf As New PdfDocument(reader)
  
                  Dim util As New SignatureUtil(pdf)
  
                  Dim signModel As String = "[Signature: {0} - {1}]"
  
                  For Each signame As String In util.GetSignatureNames()
                      Dim whoisthis As PdfSignature = util.GetSignature(signame)
                      returnVal &amp;= String.Format(
                          signModel,
                          whoisthis.GetName(),
                          whoisthis.GetReason
                          )
                  Next
  
          End Using
  </code></pre>