Reputation: 31
I have loaded a pdf form using PDFKit in iOS 11. I am trying to save the editable fields ( Checkbox, TextBox) values. How do I get back the editable PDFDocument object to save the PDF contents using
Upvotes: 1
Views: 331
Reputation: 31
Thanks. I did something like this. I added and Observer and on receiving notification when the pdf changes write the contents to a filepath
PDFView *view = notification.object;
PDFDocument *myDocument = view.document;
NSData* content = myDocument.dataRepresentation;
[content writeToFile:newPath atomically:YES];
That worked for me.
Upvotes: 1