Document Viewer Integration

Setup

The first step in integrating the document viewer is to create a Pandexio app in using the App Console.

Once you have created your app you will need to write your signature generation code.

Create Projects

Pandexio documents are contained in projects.  Projects contain documents and have a set of members.

/projects/create will create a project that documents can be added to.

Once the project is created you can add additional members, the user that created the project is automatically added as the first member.  

/projects/addmembers will add additional members to a project.

Add Documents and Web Pages to Projects

There are 3 ways to add documents via the Core API.

/documents/uploadfiles will upload and add documents directly to a project

/documents/capturewebsite will capture the web page and add to a project

/documents/downloadfiles will have the Pandexio system download files from an external location and add to a project.

View and snip documents

Viewing and sniping of documents is done by launching the Pandexio document viewer.

You can either render the link to the document viewer immediately after receiving the response from the uploadfiles/downloadfiles request and let the document viewer inform the user if the file is not ready to be displayed yet.  Or, you can subscribe to a webhook for DocumentCreated notifications and only show the link when the document is ready.

If you would like to be notified when a snip is created on a document you can subscribe to the SnipCreated webhook.

Similarly, if you would like to be notified when a comment is created on a snip you can subscribe to the SnipCommentCreated.  

Launching the Document Viewer UI

The document viewer can be seamlessly and securely opened by using the following url format containing valid request signature query string parameters.

URL Format 

https://app.pandexio.com/viewer/document/[documentId]?[request_signature_parameters]

URL Example

https://app.pandexio.com/viewer/document/710da3d4-7dfe-4809-9758-9c4b4d774dfc?PdxPublicKey=12345&PdxRequestSignature=76828617BF24%3aIQRxyhk1d9w45%2f9XEAB3RKmlPNs%3d&PdxTimestamp=2013-03-20T14%3a15%3a45Z&PdxEmail=jsmith%40company.com&PdxFullName=John+Smith