I have implemented a system for dragging annotations to a new location on a page. However, if the annotation is dragged across a page boundary I have not been able to find in the framework any way of putting the annotation onto the new page.
Hi and thanks for the reply. Forgive me if I am missing something obvious But it seems like the Page object does not support adding an existing annotation to a Page. It only seems to support creating new annotations. Have I missed something?
Nop, you did not miss anything (the Page object does not support adding an existing annotation to a Page).. to support this you need to check the type and the parameters of the annotation being moved..
create a new one with the same specs in the next page and then remove the old annotation from the first page
That almost works… However I am using a PDF that was annotated in Adobe Reader. The PDF contains stamp annotations. There does not appear to be any way of re-creating a stamp annotation on a new page. I believe there are other annotation types that the library does not support as well, such as the "thought bubble / curly line" annotation type.
This means if you open a PDF that was annotated in Reader, you can move some annotations to a new page and not others.
It looks like I will have to proceed by not allowing any annotations to be moved to a new page by constraining the user's drag operation. I'd like to suggest that if possible it would be great to add a method to the Page object allowing existing annotations to be assigned to a new page, to make the library more useful in the future.