Hello...
I am using iTextSharp 4.0.4 class library and its PdfReader and PdfStamper
classes for decryption of pdf files.
I could succeed with decrypting pdf files with following cases -->
1. Pdf file encrypted with both user and owner password.
2. Pdf file encrypted with only the owner password.
But I am not able to decrypt it in the case where Pdf file is encrypted with
both only user password.
Could you please help me in this regard?
The C# code snippet that I am following is as follows:
________________________________
string strFileName = "encrypt.pdf", strDecryptedFile = "decrypt.pdf";
PdfReader _pdf = new PdfReader(strFileName, somepassword);
//@+ decryption routine
if(_pdf.IsOpenedWithFullPermissions)
{
stamper = new PdfStamper(_pdf, new
FileStream(strDecryptedFile,FileMode.Create));
stamper.Close();
}
//@- decryption routine
________________________________
Thanks in advance,
Suresh
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/