ComPDFKit Web SDK
    Preparing search index...

    Function enterMultiViewerMode

    • Enters side-by-side mode (left key 1, right key 2). Resolves once the right pane is ready and triggers UI.Events.MULTI_VIEWER_READY. From the compare / page editor / color separation / content editing groups, returns to the View group first. Does nothing when already in it. Rejects when the UI is not mounted (the second pane's DOM never appears) or the instance is destroyed.

      Returns Promise<void>

      A Promise that resolves once the right pane is ready.

      await instance.UI.enterMultiViewerMode();
      await Promise.all([
      instance.UI.loadDocument('/files/contract-v1.pdf', {}, 1),
      instance.UI.loadDocument('/files/contract-v2.pdf', {}, 2),
      ]);
      instance.UI.enableMultiViewerSync(1);