We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error in encrypted file: Source array was not long enough. Check srcIndex and length- and the array's lower bounds


I have one encrypted stream, and I try to find out if it is encrypted or not by foillowing code:

PdfFileInfo inputPDFInfo = new PdfFileInfo(pdfInputStream);

if (inputPDFInfo.BeEncrypted)


MessageBox.Show("Encrypted file"


Now when I initialize this object "PdfFileInfo" it throws following error:

"Source array was not long enough. Check srcIndex and length, and the array's lower bounds"

Please help me,

If file is not encrypted it is not throwing error



Can you please provide us with the pdf file that you are using so that we can more accurately determine the cause of the problem.