I have created a pdf using itextsharp. The requirement is that while sending the PDF as attachment in an email and it should be password protected.
I know that we can make a pdf password protected while creating it using itextsharp.
Is there any way to make an existing pdf password protected?
Use
PdfReaderin combination withPdfStamperand thesetEncryption()method.In Java, see
encryptPdf()in this example: http://itextpdf.com/examples/iia.php?id=219In C#, see
EncryptPdf()in this example: http://kuujinbo.info/iTextInAction2Ed/index.aspx?ch=Chapter12&ex=EncryptionPdf