We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, i have protected pdf. i want open , possible?
The text was updated successfully, but these errors were encountered:
GreatReader doesn't support protected pdf. But you can unlock with CGPDFDocumentUnlockWithPassword.
Sorry, something went wrong.
Thanks.
(instancetype)initWithPath:(NSString *)path {
self = [super initWithPath:path]; if (self) { //burada şifrele
NSURL *URL = [NSURL fileURLWithPath:path]; _CGPDFDocument = CGPDFDocumentCreateWithURL((__bridge CFURLRef)URL); //PDFファイルがパスワード付きか調べる BOOL isEncrypted = CGPDFDocumentIsEncrypted(_CGPDFDocument); if(isEncrypted){ NSLog(@"isEncrypted YES"); }else{ NSLog(@"isEncrypted NO"); } NSString *password = @"!XI5u2ri3Ar?."; BOOL isUnlocked = CGPDFDocumentUnlockWithPassword(_CGPDFDocument, [password UTF8String]); if(isUnlocked){ if (_CGPDFDocument) { _numberOfPages = CGPDFDocumentGetNumberOfPages(_CGPDFDocument); } else { self.fileNotExist = YES; return self; } _currentPage = 1; _brightness = 1.0; [self loadThumbnailImageAsync]; _kvoController = [FBKVOController controllerWithObserver:self]; }else{ NSLog(@"isUnlocked NO"); }
} return self; }
No branches or pull requests
Hi, i have protected pdf. i want open , possible?
The text was updated successfully, but these errors were encountered: