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
| Prop | Type | Required | Description |
|---|---|---|---|
docIds | Array<JSON Object> | Required | Pass an array of JSON objects that contain _fileId and _fileVersionId properties and values. |
docIds.[]._fileId | String | Required | Pass a file's ID. |
docIds.[]._fileVersionId | String | Optional | Pass a file version's ID. |
style | JSON Object | Optional | Pass a JSON object with height and width properties. |
style.height | String | Optional | Takes a percent value between 0% and 100% for the document display height. |
style.width | String | Optional | Takes 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%' }}
/>