Copy link to clipboard
Copied
I am trying to set user profile using this . But when i try adding annotations it still shows as Guest.
Copy link to clipboard
Copied
NVM, I was previewing somewhere else. Maybe that's why it didn't work. Got it working after doing a previewFile
Copy link to clipboard
Copied
For other developers who might run into this question, I have a CodePen here that shows how to set up user profiles. There are two views side by side reviewing the same document. The left and right sides have two different user profiles assigned and the event callbacks make it so that the user on each side can only select their own annotations.
Copy link to clipboard
Copied
Thanks a lot Joel 🙂
Copy link to clipboard
Copied
how to get the file ID sir? is this manually created
Copy link to clipboard
Copied
They are arbitrary but I use the second element in the document ID array of the PDF. The document ID is an array of two strings in hex-encoded binary format. The first string is a permanent identifier based on the contents of the file at the time it was originally created; it does not change when the file is incrementally updated. The second string is a changing identifier based on the file’s contents at the time it was last updated. These identifiers are defined by the optional ID entry in a PDF file’s trailer dictionary.