Skip to content
New issue

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

Does not save last annotation #69

Open
amrit42087 opened this issue Sep 14, 2017 · 3 comments
Open

Does not save last annotation #69

amrit42087 opened this issue Sep 14, 2017 · 3 comments

Comments

@amrit42087
Copy link

amrit42087 commented Sep 14, 2017

I am using your library in one of my projects. I am unable to render all the annotations onto the pdf. Lets say I first selected pen annotation and I drew my signatures. If I then call renderOntoPDF() method, the psd won't be saved with my signatures.
Now lets say I first selected pen annotation and drew my signatures. Now I again selected text annotation and wrote some text on to the pdf. This time only signatures would be rendered on calling renderOntoPDF() method. Both the annotations won't be saved. As an extract, last annotation is not saved. This also happens with the demo project on github. Can you please help me out with this issue. I am about to launch my application. I am only left with this issue.

Here is the video:
demo.zip

@pushchris
Copy link
Contributor

@amrit42087 what version of the framework are you using as well as who version of iOS? Thanks.

@amrit42087
Copy link
Author

Its the latest version. I installed it using the following command: pod "UXMPDFKit"
My iOS version is 10.3.2

@pushchris
Copy link
Contributor

@amrit42087 you'll need to close out of the current annotation and save it before rendering it. An active annotation is still pending save. When you leave the annotation controller it should automatically do this, see:

self.annotationController.finishAnnotation()
self.document.annotations = self.annotationController.annotations
self.document.save()

If you are overriding PDFViewController you will want to make sure to call these methods manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants