All kinds of fixes we had to add while using the PDF lib in a productive environment

* A couple of NULL parameter issues
* Potential private API call warnings when submitting and app
* Added support and test cases in the demo for AES encrypted documents