New Forum | Previous | Next | (P-PDF) Developers
Topic: Trouble with encryption
Conf: (P-PDF) Developers, Msg: 123917
Date: 12/15/2004 08:45 PM
I generate PDFs programmatically (don't use PDFLib or any other third-party libraries). Now, I must to add encryption feature in my PDFs.
I write PDF Encrypt dictionary, compute /O and /U strings, encryption key, such as described in PDF Reference 1.4.
Than I see strange things: for some passwords, when I create encrypted PDF, all works fine and Acrobat Reader opens my files (of course, after I enter correct user password). But for some another passwords or for the same passwords sometime later, Acrobat Reader doesn't recognize correct password for created PDF!
I generate ID string in trailer from current time only - this can explain correlation between errors and creation time. Is this the great error?
I try to use MD5 on the time string - but it doesn’t help me.
I not found any algorithms for generation file ID in PDF Reference. Only recommendation.
Where have I make mistake?