Real-Time Collaboration Server

PSPDFKit Instant is our prebuilt solution for synchronizing annotations across multiple concurrent users, devices, or sessions. It offers developers a self-hosted solution that handles document viewing on any web, iOS, Android, Flutter, and React Native app. It’s a licensable component that’s included as part of Document Engine.

PSPDFKit Instant consists of two parts: the Document Engine backend, and the client frameworks. The Document Engine backend manages authentication, synchronization, data, conflict resolution, version tracking, diffing, and merging. The PSPDFKit Instant mobile and web frameworks integrate into your app and communicate with the Document Engine backend.

Try for Free <a class=“pE pL pJ pV” %>” href=“https://pspdfkit.com/demo/instant-collaboration” target=”_blank”>Launch Demo

Key Capabilities

  • Real time — Sync edits and annotations to a server or across devices

  • Self-hosted — Maintain complete control over your data

  • Device agnostic — Consistent UX across web, mobile, and desktop clients

  • Conflict resolution — Handle simultaneous concurrent edits

  • Secure authentication — Easy integration with existing systems

  • Data management — Separate layer for annotation and form data

  • User permissions — Fine-grained control over what users can see or edit

How PSPDFKit Instant Works

If the Instant license component is enabled, Document Engine can synchronize changes to annotations across multiple users in real time. This allows your users to collaborate in real time. The following sections provide an overview of how this works.

Listening for Changes

  1. A user opens a document hosted on Document Engine.

  2. An initial sync request is sent, and the response contains all the annotations that currently exist in the document.

  3. The user’s client will start listening for changes to annotations happening on the server.

  4. As soon as a change happens, Document Engine will send a list of all added, changed, and removed annotations.

  5. The client updates its local state and continues listening for changes.

Making Changes

  1. A user makes a change to existing annotations.

  2. The user’s client sends a request containing the changes to the Document Engine server.

  3. Document Engine sends back a response that tells the client which changes were accepted and which ones were rejected due to conflict.

  4. The client updates its local state and continues listening for changes.

Handling Conflicts

When using PSPDFKit Instant, conflict resolution is automatically managed for you. Here’s how it works:

  1. User A and User B make a change to an existing annotation.

  2. User A’s change is processed first, updating Annotation A to Annotation B.

  3. User A receives a response containing the applied changes.

  4. User A’s local state is updated, and it continues listening for changes.

  5. User B’s change is processed second, but the update from Annotation A to Annotation C is rejected since the annotation has changed between this update and the last state User B knew about.

  6. User B receives a response that their change was rejected, and that Annotation A was updated to Annotation B.

  7. User B’s local state is updated, and it continues listening for changes.

Diagram showing how annotations are synced between multiple clients when using Instant

How to Collaborate in Real Time without PSPDFKit Instant

If you don’t have Instant sync enabled, Document Engine will use a different strategy when sending annotations to your users. The main drawback of this strategy is that changes to annotations won’t appear for users automatically in real time, but instead only after a page refresh.

  1. A user opens a document hosted on Document Engine.

  2. The annotations are fetched for each page as they come into view.

  3. For each annotation change, a request is sent to the Document Engine server creating, updating, or deleting the annotation.

  4. Changes made by other users aren’t sent to the user in real time, and they’ll only appear after a page refresh.

Diagram showing how annotations are synced between multiple clients when not using Instant

Supported Client Platforms

Document Engine can integrate seamlessly into the following PSPDFKit frontend SDKs for real-time collaboration: