Skip to content

Latest commit

 

History

History
104 lines (70 loc) · 4.34 KB

File metadata and controls

104 lines (70 loc) · 4.34 KB

WebViewer - Microsoft Teams Sample

WebViewer is a powerful JavaScript-based PDF Library that's part of the PDFTron PDF SDK. It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulate PDFs that can be embedded into any web project.

WebViewer UI

This repo is specifically designed for any users interested in integrating WebViewer into Microsoft Teams project.

Demo

You can explore all of the functionality in our showcase.

Initial setup

Before you begin, make sure your development environment includes

Install

  1. Open webviewer-angular-sample in VS Code
  2. Install dependencies
npm install

Run

npm start

Use ngrok to make local running instance externally accessible

Install ngrok via Chocolatey

choco install ngrok

Add auth token (You generate your own token and input it here)

ngrok authtoken <token>

Start a tunnel (Note: Change port “4200” as needed)

ngrok http 4200 --host-header=localhost:4200

Setup Microsoft Teams project and sideload

  1. Use the Teams Toolkit extension in VS Code and open the teams-project folder
  2. Go to the teams-project\templates\appPackage\manifest.local.template.json file
  3. Replace the text replace url here in file with your public endpoint from ngrok
  4. Press F5 to run

TeamsSideload3

Alternatively

  1. Open Microsoft Teams
  2. Click on Apps
  3. Click on Manage your apps
  4. Click on Upload a customised app
  5. Upload the .zip file from the built project (usually in the packages folder or build folder)

TeamsSideload1

Sideloading issues

Note: If there is an issue with Sideloading not being enabled, you must sign into the admin center as the admin and enable it.

  1. At the admin center, select Teams
  2. Expand Teams apps
  3. Underneath go to Setup policies
  4. Enable Upload custom apps

TeamsSideload2

Resources