Some test text!

Setup (Android)

Realtime collaboration setup

You can setup realtime collaboration functionality using the collaboration package with the PDFTron SDK.

Setting up realtime document collaboration in Xamarin

This tutorial only applies to Xamarin.Android.


  • Minimum API: 21
  • Java 8

To compile for Java 8, add the following to your application's .csproj file:

Visual Studio 2019 is required


Step 1: Integration

  1. Integrate PDFTron core and the tools library as described here .
  2. Open the NuGet package manager by right click on your project, and click Manage NuGet Packages.... Then in Browse tab, search for PDFTron.


NuGet for Collab

Step 2: Add the viewer

  1. Update your AndroidManifest.xml as described in Step 1 of this guide .

  2. Create the CollabViewerTabHostFragment2, and start it like any other Android Fragment.

    private void addViewerFragment(AppCompatActivity activity, Android.Net.Uri fileUri)
        // Create a custom ViewerConfig used to initialize the viewer fragment
        var viewerConfig = new ViewerConfig.Builder()
        // Create the Fragment using CollabViewerBuilder2
        var tabHostFragment = (CollabViewerTabHostFragment2)CollabViewerBuilder2
        // Add the Fragment to your activity
        var ft = activity.SupportFragmentManager.BeginTransaction();
        ft.Replace(Resource.Id.fragment_container, tabHostFragment, null);

where is the resource id of a layout in your activity that will contain your fragment:

For example:

<?xml version="1.0" encoding="utf-8"?>
<!-- This FrameLayout will contain our viewer fragment -->
<FrameLayout xmlns:android=""

Next steps

Get the answers you need: Support

Upcoming Webinar: SDK Features Preview and Live Run-Through | July 14, 2022 at 11 am PT


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use