decrypting pdf protected by aes-256bit using the right password
Question: Is there any way to decrypting a pdf protected by an aes-256 bit key?

I have the correct password and I need a command-line tool (or library -
perhaps in python :P ) for decrypting the file and then doing some operation
over it.

The best thing could be if the file could be saved decrypted, then I elaborate
it and then I can remove it...

Does anyone know something about it?


Answer: 
    import pyPdf                                                                
    pdf = pyPdf.PdfFileReader(open("file.pdf"))
    pdf.decrypt("password")
    

You can then do whatever you want with the contents. This will work with
either the user or owner passwords.

