Some test text!

Search
Downloads
Chat with us
Discord Logo
Hamburger Icon

Xamarin / Guides / Connect to server

Get started

Samples

Basic operations

Learn More

Viewer

UI customization

Annotation

Collaboration

Overview Setup (Android) Connect to server Custom UI (Android) Samples APIs

MS Office

Conversion

PDF/A

Forms

Generate

Page manipulation

Edit page content

Extraction

Digital signature

Search

Bookmarks

Compare files

Optimization

Layers (OCGs)

Measurement

Print

Redaction

Security

Portfolios

Low-level PDF API

Realtime collaboration server

A server can be setup to be the backend that hosts all your files and annotations to use realtime collaboration with Apryse SDK.

Realtime collaboration basics

This tutorial only applies to Xamarin.Android.

Host annotations in your own server

In realtime collaboration, a server will merely act as an online database that triggers events upon data creation/modification/deletion. As long as the above requirement is met, your server can be built in any language and stack of your choice. Apryse provides an interface that will allow you to connect your data to the out-of-box UI.

  1. Your will need to obtain a reference to CollabManager from the CollabViewerTabHostFragment2, then setup the current collaboration session, for example:

    C#

    void HandleTabDocumentLoaded(String tag) { // setup the current collaboration session var collabManager = mPdfViewCtrlTabHostFragment.CollabManager; if (collabManager != null) { collabManager.SetCurrentUser(mUserId, mUserName); collabManager.SetCurrentDocument(mDocumentId); collabManager.SendAnnotationEvent += (sender, e) => { // local change, send info to server here }; } }
    Copy
  2. When your server notifies the client about remote changes, import the XFDF command string with CollabManager:

    C#

    void ImportXfdf(String xfdfCommand) { var collabManager = mCollabViewerTabHostFragment.CollabManager; collabManager.ImportAnnotationCommand(xfdfCommand); }
    Copy

The annotations appearing on the document in real time are managed through a separate XFDF format, while the original version of the document is preserved on the server. Note that the client downloads the original untouched document at the start of the collaboration session.

And that is it! Apryse will handle all annotation syncing and annotation reply for you.

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales