Copy link to clipboard
Copied
Hi,
I've been looking into the comments and markup / annotation part of Adobe Embed API, and came across some problems
1. Names
How do I add a different name to the comments? Everyone gets "Guest" as the name...
Example: I open a PDF through the PDF Embed API and make some comments. I am then given the name "Guest". I save the comments to my server. I then open the link from a different computer and add a reply. It is also with the name "Guest", and that makes collaboration kind of hard...
I could probably do some code that replaces data when saving, or some function that listens for added comments and then filters and rebuilds the JSON with new names and then reloads everything, but it all seems so cumbersome. It would be so much nicer if I could set the username through the API, and then every new comment would get that username. Anyone know if this is possible?
See screenshot "Annotations_Screenshot_v1.jpg"
2. Undo/Redo
When I save the comments my server and reload them on a different computer, the "undo/redo" buttons appear immediately, and I can undo all the previous comments added from other users. Is there any way of blocking this?
See screenshot "Annotations_Screenshot_v2.jpg"
3. Deleting of other users post
When loading comments from the server I can go to any post and click "edit" or "delete". Anyone know how to change / lock this? (This is sort of related to the previous issue)
4. Removing annotation items
After some testing we found out that our end-users didn't want/need a couple of the annotation-tools -- they only made things confusing. Anyone know how to get rid of the "Add Text Comment" item, and the "Highlight Text" group (entirely)?
See screenshot "Annotations_Screenshot_v3.jpg"
Copy link to clipboard
Copied
Update:
Problem 1: Setting the user name:
Setting the name works just fine through "AdobeDC.View.Enum.CallbackType.GET_USER_PROFILE_API", but it seems like it is impossible to change/set a new name after the annotationmanager is initialized -- which is what I'm trying to do. Anyone know if this is possible?
Problem 2: Undo/redo
These buttons have a class ("spectrum-Tool spectrum-Tool--quiet"), so I was thinking of changing it to "display: none" -- but it was kind of hard of overriding anything. Anyone know if this is possible?
Problem 3: Locking items
It seems like this has been a problem for many years:
I tried using the method/codepen, but it seemed kind of flaky when you are able to delete someones comment and have it reappear. Anyone had better luck with this?
4:
Copy link to clipboard
Copied
Could you please provide me the working sample for the Problem 1. I'm not able to make it.