WebViewer Real Time Collaboration Sample - using WebSocket, SQLite3 and Node.js server
This is a WebViewer sample to show how you can construct a real time collaboration server for WebViewer through WebSocket, SQLite3, and Node.js server.
The below diagram depicts the structure of the real time collaboration sample app.
Before you begin, make sure your development environment includes Node.js.
git clone https://github.com/PDFTron/webviewer-realtime-collaboration-sqlite3-sample.git cd webviewer-realtime-collaboration-sqlite3-sample npm install
How to use
- Open browser window in incognito mode and go to port 3000
- Create annotations with annotations tools in the header
- See the changes being applied in real time in other windows
- You can access the real time server from a different device in the same network via replacing
localhostin your URL to the server's IP address.
If you are also using PDFTron's Android SDK, you can find the corresponding Android sample that will work out-of-box with this project: Android CollabWebSocketSample.