Integrate real-time collaboration with instant sync
To get started with Instant, you need to have the Instant component enabled in your license. If you’re trialing PSPDFKit, all features will be enabled.
Next, to facilitate real-time syncing between multiple clients, you need a central server. This is where Document Engine comes into play; it’ll serve as a central point to ensure all clients see the same state. Document Engine serves as the backend when implementing real-time collaboration features into your web and mobile applications.
Refer to the getting started guide for the platform you’re looking to implement real-time collaboration for from the list below:
Get Started with Instant Sync on iOS
Add real-time collaboration features to your iOS applications
Get Started with Instant Sync on Android
Add real-time collaboration features to your Android applications
Get Started with Instant Sync on Web
Add real-time collaboration features to your web (browser-based) applications
Get Started with Instant Sync on Flutter
Add real-time collaboration features to your Flutter applications
Get Started with Instant Sync on React Native
Add real-time collaboration features to your React Native applications
Permissions
If you have the Collaboration Permissions license feature enabled, you also have access to a granular permission system, which allows you to control what each user can see and do. To use it, you have to include the collaboration_permissions
and user_id
properties in your JSON Web Token (JWT).
Here’s how this might look:
// JWT claims: { ...otherProperties, "collaboration_permissions": [ "annotations:view:all", "annotations:edit:all" ], "user_id": "user-12345" };
The presence of collaboration_permissions
and user_id
is mandatory for enabling Collaboration Permissions.
If the Collaboration Permissions feature is enabled, all its associated actions are disabled unless you manually allow them. For example, collaboration_permissions: []
means users won’t be able to view any annotation, comment, or form field on a PDF. If collaboration_permissions
isn’t present in the JWT, then Collaboration Permissions will automatically be disabled, and users will be able to perform every action without any restriction.
In the code above, collaboration_permissions
is an array of permission strings. The permission strings define the permissions that have been granted to the user. Each string consists of three parts written in the <content-type>:<action>:<scope>
format. You can learn more about different possible values of content type, action, and scope in the defining permissions guide.