Managing Multiple Users
If you need multiple people to annotate independent copies of the same document, you don’t need to upload the document multiple times. Instead, you can assign a different layer to each person. Document Engine will maintain a completely different set of annotations for each layer, thereby saving storage space. Alternatively, restrict users’ access to specific content on a layer by using Collaboration Permissions.
Assigning a Different Layer to Each Person
-
Your service provides your web application with JSON Web Tokens (JWTs) used for authentication. There are two different users: Both use the same document, but each of them uses a distinct Instant layer.
-
Each user creates an annotation in their own layer. Annotations in different layers are completely separate, and annotations in one layer can’t be seen in any other layer. This approach can be used to separate annotations created by distinct users or by different document perspectives, e.g. marking up important information in the document and reviewing it.
-
Each viewer instance only receives annotations created in its own layer, thereby maintaining the separation of content between users.
-
A single document can have as many layers as you need. PSPDFKit will efficiently use the same underlying asset, generating layer-specific PDF files only when needed (e.g. if you want to download the PDF for a user’s layer).
Restricting Users’ Access to Specific Content on a Layer
If you need multiple people to annotate independent copies of the same document, you don’t need to upload the document multiple times. Instead, you can restrict users’ access to specific content using Collaboration Permissions.
-
Your service provides your web application with JWTs for authentication for two different users. Both tokens reference the same document and layer but have different permissions. The first token allows its user to create annotations and view their own annotations. The second token allows its user to create annotations and view all annotations in the layer.
-
The first user creates an annotation in the layer, which is saved in the database by Document Engine.
-
The annotation ID is returned to both Web SDK instances: Both the first and second user can see the newly created annotation.
-
The second user creates an annotation.
-
The annotation ID is returned only to the second Web SDK instance, because the first user doesn’t have permission to view annotations of other users.
Supported Clients
Instant Layers and Collaboration Permissions are available in the following PSPDFKit frontend SDKs:
-
PSPDFKit for Android (Collaboration Permissions are currently in development)
-
PSPDFKit for Flutter (Collaboration Permissions are currently in development)
-
PSPDFKit for React Native (Collaboration Permissions are currently in development)