Skip to main content
Version: v4.6

Document Viewer Overview

IafDocViewer#

The IafDocViewer takes document IDs and renders the documents in a web page viewer. The IafDocViewer identifies the file type based on the properties of the file uploaded to the system.

Props#

PropTypeRequiredDescription
docIdsArray<JSON Object>RequiredPass an array of JSON objects that contain _fileId and _fileVersionId properties and values.
docIds.[]._fileIdStringRequiredPass a file's ID.
docIds.[]._fileVersionIdStringOptionalPass a file version's ID.
styleJSON ObjectOptionalPass a JSON object with height and width properties.
style.heightStringOptionalTakes a percent value between 0% and 100% for the document display height.
style.widthStringOptionalTakes a percent value between 0% and 100% for the document display width.

Example#

The following in an example of a docIds array:

docIds = [    {        "_fileId": "da9a12ac-699c-4232-8c06-fc789eb9d6e5"    },    {        "_fileId": "aa51b6b9-8c61-4bea-a5bf-66fd4d423f9e",        "_fileVersionId": "81266d27-7fb6-4c80-bf3c-77038ffdbfd7"    }]

The following example is an IafDocViewer component invocation:

<IafDocViewer    docIds={docIds}    style={{ height: '100%', width: '100%' }}/>