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.

Launch Demo

Assigning a Different Layer to Each Person

Declare different layer names in the JWT used for authentication to create different perspectives of the same document.

  1. 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.

  2. 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.

  3. Each viewer instance only receives annotations created in its own layer, thereby maintaining the separation of content between users.

  4. 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.

Declare different layer names in the JWT used for authentication to create different perspectives of the same document.

  1. 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.

  2. The first user creates an annotation in the layer, which is saved in the database by Document Engine.

  3. The annotation ID is returned to both Web SDK instances: Both the first and second user can see the newly created annotation.

  4. The second user creates an annotation.

  5. 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: