1
我現在使用pspdfkit for ios,現在我可以從本地目錄註釋pdf。問題是註釋是自動保存的。我已經打開這樣的pdf。只有當我按下保存按鈕時,我怎樣才能保存pdf?我可以像下面的代碼一樣自定義保存按鈕。pspdfkit自定義保存iOS
PSPDFDocument *document = [PSPDFDocument documentWithURL:documentURL];
PSPDFViewController *pdfController = [[PSPDFViewController alloc] initWithDocument:document];
pdfController.openInButtonItem.openOptions = PSPDFOpenInOptionsOriginal;
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(backFromDocument)] ;
pdfController.leftBarButtonItems = @[backButton];
pdfController.rightBarButtonItems = @[pdfController.annotationButtonItem, pdfController.searchButtonItem, pdfController.outlineButtonItem, pdfController.viewModeButtonItem];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pdfController];
[self presentViewController:navController animated:YES completion:NULL];