pdf - pspdfkit Custom Save iOS -
i using pspdfkit ios , can annotate pdf local directory. problem annotation saved automatically. have opened pdf this. how can save pdf when press save button? can custom save button following codes.
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];
to disable autosave function call document.annotationsavemode = pspdfannotationsavemodedisabled
on pspdfdocument.
to save annotation clicking specific button can call saveannotationswitherror
in pspdfannotationparser.
Comments
Post a Comment