Aspose.PDF - Error while applying the password protection

We are experiencing difficulties while applying a password to a PDF. Here are the details:

*An error occurs when the PDF file is marked with an eSignature
*Getting error when PDF file is marked with eSignature

(Receiving error on below highlighted line)
Document pdfDocument = new Document(ms);

*Please note that the same code works for PDFs that are not marked with an eSignature.

@Meem

Would you please share your sample code snippet as well as sample PDF for our reference? We will test the scenario in our environment and address it accordingly.