Resolving a PDF loading issue.

Q: I have a PDF which loads fine with Acrobat but calling
PDFDoc.GetPageCount() throws an exception: \"Compressed object is
corrupt, Conditional expression: GetObj().

Sample code to reproduce this:

PDFDoc Document = new PDFDoc(\"C:\\\\SWISAApplicationForm.pdf\");
int n = Document.GetPageCount();
A: The problem is that the document is encrypted. To fix the problem
you need call InitSecurityHandler() immediately after creating the

PDFDoc doc = new PDFDoc(\"C:\\\\SWISAApplicationForm.pdf\");
int n = doc.GetPageCount();

Since you can call InitSecurityHandler() on any PDF document without
negative side effects it is a good idea to call this method whenever
you open an existing document.