---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-07
---
# Viewer component
Displays content from an ACS repository.
See it live: [Viewer Quickstart](https://embed.plnkr.co/iTuG1lFIXfsP95l6bDW6/)
## Contents
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Keyboard shortcuts](#keyboard-shortcuts)
- [Details](#details)
- [Integrating with the Document List component](#integrating-with-the-document-list-component)
- [Custom file parameters](#custom-file-parameters)
- [Supported file formats](#supported-file-formats)
- [Content Renditions](#content-renditions)
- [Configuring PDF.js library](#configuring-pdfjs-library)
- [Custom toolbar](#custom-toolbar)
- [Custom toolbar buttons](#custom-toolbar-buttons)
- [Custom sidebar](#custom-sidebar)
- [Custom thumbnails](#custom-thumbnails)
- [Custom "Open With" menu](#custom-open-with-menu)
- [Custom "More actions" menu](#custom-more-actions-menu)
- [Extending the Viewer](#extending-the-viewer)
- [See also](#see-also)
## Basic usage
Using with node id:
```html
```
Using with file url:
```html
```
Using with shared link:
```html
```
Note that if you have a URL which contains a shared link ID, you should extract the
ID portion and use it with the `sharedLinkId` property rather than using the whole
URL with `urlFile`.
## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| allowDownload | `boolean` | true | Toggles downloading. |
| allowFullScreen | `boolean` | true | Toggles the 'Full Screen' feature. |
| allowGoBack | `boolean` | true | Allows `back` navigation |
| allowNavigate | `boolean` | false | Toggles before/next navigation. You can use the arrow buttons to navigate between documents in the collection. |
| allowPrint | `boolean` | false | Toggles printing. |
| allowShare | `boolean` | false | Toggles sharing. |
| allowSidebar | `boolean` | false | Toggles the sidebar. |
| allowThumbnails | `boolean` | true | Toggles PDF thumbnails. |
| blobFile | `Blob` | | Loads a Blob File |
| canNavigateBefore | `boolean` | true | Toggles the "before" ("<") button. Requires `allowNavigate` to be enabled. |
| canNavigateNext | `boolean` | true | Toggles the next (">") button. Requires `allowNavigate` to be enabled. |
| displayName | `string` | | Specifies the name of the file when it is not available from the URL. |
| downloadUrl | `string` | null | URL to download. |
| fileName | `string` | | Content filename. |
| maxRetries | `number` | 5 | Number of times the Viewer will retry fetching content Rendition. There is a delay of at least one second between attempts. |
| mimeType | `string` | | MIME type of the file content (when not determined by the filename extension). |
| nodeId | `string` | null | Node Id of the file to load. |
| overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
| sharedLinkId | `string` | null | Shared link id (to display shared file). |
| showSidebar | `boolean` | false | Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. |
| showToolbar | `boolean` | true | Hide or show the toolbar |
| showViewer | `boolean` | true | Hide or show the viewer |
| sidebarPosition | `string` | "right" | The position of the sidebar. Can be `left` or `right`. |
| sidebarTemplate | `TemplateRef` | null | The template for the sidebar. The template context contains the loaded node data. |
| thumbnailsTemplate | `TemplateRef` | null | The template for the pdf thumbnails. |
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
| fileNodeId | | | Node Id of the file to load. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| download | `EventEmitter>` | Emitted when user clicks the 'Download' button. |
| extensionChange | `EventEmitter` | Emitted when the filename extension changes. |
| goBack | `EventEmitter>` | Emitted when user clicks the 'Back' button. |
| navigateBefore | `EventEmitter