Hi all
I have a PDF document that has an owner password set but no user password. Therefore it is encrypted.
I know the owner password and want to use PDFKit to confirm when the document has been decrypted.
I have used the PDFDocument unlockWithPassword method which returns YES when the file is unlocked. However this method also returns yes when the file has been unlocked by a user password and not the owner password.
The unlockWithPassword method appears not to change the state of the isEncrpyted method which I tried to use to confirm the decryption.
I want to decrpyt the file so that I can use the write methods to write a new file with no security. At the moment calling this method on the document object results in a zero length file being created. I assume this is because of the encryption.
Am I going about this the right way or should I be using a different method for decrypting the pdf file.
Thanks in advance.
Craig Wanstall