title: How to check if a PDF has any kind of digital signature
body: <p>I need to understand if a PDF has any kind of digital signature. I have to manage <em>huge</em> PDFs, e.g. 500MB each, so I just need to find a way to separate non-signed from signed (so I can send just signed PDFs to a method that manages them). Any procedure found until now involves attempt to extract certificate via e.g. Bouncycastle libs (in my case, for Java): if it is present, pdf is signed, if it not present or a exception is raised, is it not (sic!). But this is obviously time/memory consuming, other than an example of resource-wastings implementation. </p>
  
  <p>Is there any quick language-independent way, e.g. opening PDF file, and reading first bytes and finding an info telling that file is signed? 
  Alternatively, is there any reference manual telling in detail how is made internally a PDF?</p>
  
  <p>Thank you in advance</p>