Available Now: Explore our latest release with enhanced accessibility and powerful IDP features
By Ian Morris | 2023 Oct 06
4 min
Tags
collaboration
react
webviewer
In modern document workflows, the ability for team members to share and collaborate on documents in real-time is invaluable. Instant commenting and annotation features significantly improve productivity and streamline communication when working on shared documents. The Apryse WebViewer SDK provides a seamless and secure solution to implement these capabilities and more, across a wide range of environments.
The WebViewer offers a wealth of functionalities for viewing (and editing) documents, yet it also provides extensive and customizable annotation and markup tools out-of-the-box. There are well over 30 different annotation types currently supported, covering many use cases and work flows. With the WebViewer’s document collaboration component, you have the ability to setup user roles and permissions, and mention or tag users using annotations in documents. In addition to PDF, it also supports many other document formats such as Office (DOCX, XLSX, PPTX), images, videos, and other formats.
In this article, we will briefly explore the advantages that instant commenting and real-time collaboration can bring, and the steps to integrate WebViewer's JavaScript document collaboration library in a React application.
Real-time collaboration using annotations allows multiple users to work on a document simultaneously. This real-time interaction fosters a collaborative environment where team members can discuss, edit, and provide feedback in real time, eliminating delays and improving efficiency.
WebViewer’s extensive annotation support facilitates quick and targeted communication within the document. Team members can highlight specific areas, add comments, and discuss changes directly within the document, providing clear context and reducing misinterpretations.
Instant feedback and real-time discussions empower teams to make quick decisions. Team members can resolve issues promptly, reducing decision-making cycles and speeding up project progress.
By allowing team members to work on the document simultaneously, real-time collaboration maximizes productivity. It also provides the flexibility to work from different locations and time zones, enabling a global workforce to collaborate seamlessly.
You can get a taste of what collaborative document workflows can look like on the Apryse Showcase demo. It gives you a side-by-side comparison of a shared document where you can add comments on one side and see them instantly appear on the other. Give it a try!
The WebViewer's intuitive and configurable interface makes adding comments to shared documents a breeze.
You can also tag specific users in comments to enhance your real-time collaboration flow. WebViewer provides APIs that can be used to capture mentions where team members are tagged in annotations. See the Mentions API documentation to learn how to enable this feature, or try out our example implementation above.
Using Mentions to tag and notify specific team members.
Now, let's walk through the steps to integrate instant commenting and real-time collaboration features using Apryse WebViewer within a React application.
To start, you need to set up WebViewer in your project. To get you started quickly we provide a comprehensive guide on integrating WebViewer into React applications. There’s also a step-by-step video if you prefer, plus you can download a ready to go sample from our GitHub repository.
Apryse'sWebViewer offers a free 7-day trial and you can sign up at https://dev.apryse.com to extend the trial period. The WebViewer trial is fully functional, but all output documents carry a watermark.
Once you’ve integrated WebViewer into your application, the next step is to set up the real-time collaboration component. You’ll find a complete real-time collaboration code sample in your WebViewer download package, in the samples/annotation/realtime-collaboration/folder
. Alternatively, you can follow our dedicated Get started guide which covers the key points of user authentication, importing and exporting annotations to and from a server, and setting the user permissions of each annotation on both the server and client side.
The way WebViewer’s collaboration features work is by having a server and client setup to monitor events such as the creation, modification, or deletion of data, and communication between your team members. In the server.js
example provided in the WebViewer download package, we’ve used a Firebase database as the backend for simplicity. The server merely acts as an online database that triggers these events, so providing these requirements are met, you can build it in whichever language and stack you prefer.
Once you’ve set up and configured your server, the next step is setting up a client application to listen or trigger events when data is created, modified or deleted in documents, and user updates.
WebViewer's JavaScript document collaboration library has specific APIs to easily import and export document annotations using XML Forms Data Format (XFDF). This is the XML version of the Forms Data Format (FDF), a simplified version of PDF for representing forms data and annotations. Annotation data in XFDF files consist of human-readable and machine-parsable XML elements describing the type, appearance, and content of the annotation, along with information about its author, creation date, location in the document etc.
WebViewer provides methods to import annotations into the viewer from their XFDF data as well as export all currently loaded annotations. As the real-time-collaboration.js
example in the WebViewer download package shows, using AnnotationManager.exportAnnotationCommand
you can easily get the XFDF data for any annotations which have been added, modified, or deleted since the last time exportAnnotationCommand
was called. Similarly, to import changed annotations you can use AnnotationManager.importAnnotationCommand
to update the WebViewer with the XFDF changes.
Integrating Apryse WebViewer into your React application and leveraging its capabilities for real-time collaboration and instant commenting can significantly elevate your document workflows. The benefits of enhanced team collaboration, streamlined communication, accelerated decision-making, and improved productivity are invaluable in today's fast-paced work environments.
For comprehensive details and further configuration options, see the complete Apryse WebViewer SDK documentation. If you have any issues or questions, you can get assistance from our Discord community. Feel free to contact our sales team for pricing or other enquiries.
Tags
collaboration
react
webviewer
Ian Morris
Technical Writer
Share this post
PRODUCTS
Enterprise
Small Business
Popular Content