I want to print a password protected PDF so at first, I tried to convert this PDF into NSData
and pass it to UIPrintInteractionController
.
But according to Googled results, you cannot unlock a PDF into an NSData
structure. The only solution is to save a password protected PDF to a non-password protected PDF, and then print that.
I searched for half a day on the internet but I still cannot find how to do that.
I know about CGPDFDocumentUnlockWithPassword
, but that is for instant viewing, and won't give me anything I can print.