Disabling highlighting while previewing a PDF file with UIDocumentInteractionController

56 Views Asked by At

My app downloads a PDF file from a web server and stores it locally on the iOS device. I then display it to the user using a UIDocumentInteractionController which is declared as a property named "controller" in the .h file.

NSURL *urlToFileToPreview = [NSURL fileURLWithPath:pathToFile];
self.controller.URL = urlToFileToPreview;
[self.controller presentPreviewAnimated:YES]

This works perfectly, but the UIDocumentInteractionController preview provides the ability to highlight text and add comment boxes, and I can't find an example of how to save those annotations so that when the file is opened again they are persistent.

Since I already have the URL of where the file is stored in the device's Documents directory, it would be a simple matter to overwrite it, but I have no idea how to extract the "changed/highlighted" file once the user presses the done button.

Since I can't find a way to save the changed file I simply want to disable highlighting so that the user doesn't have the expectation that the changes they have made will be persistent.

0

There are 0 best solutions below