Hello
I am working on Encryption. I am protecting PDF file by the below code .
Document pdfDocument = null;
pdfDocument= new Document(“C:\Users\this\Desktop\Files Images…”);
pdfDocument.encrypt(“pk”, “pk1”, 0, CryptoAlgorithm.AESx128);
pdfDocument.save(“C:\Users\this\Desktop\Files Images\pdf\Feedbac.pdf” );
But got some Exception
Exception in thread “main” java.lang.NullPointerException: Cannot read the array length because local4 is null
at com.aspose.pdf.internal.l0h.ld.lI(Unknown Source)
at com.aspose.pdf.ADocument.encrypt(Unknown Source)
at com.aspose.pdf.Document.encrypt(Unknown Source)
at com.aspose.pdf.ADocument.encrypt(Unknown Source)
at com.aspose.pdf.Document.encrypt(Unknown Source)
So please resolve As soon as possible.
I am attaching the Input file.Feedback Businessplan1.pdf (1.5 MB)
I also check your server but got some error . Password protect PDF - encrypt PDF document online
Thanks