# Generic document viewer

The Generic Document Viewer can display documents from any database, it supports most document formats and image formats.

### Basic data

**Internal name** - unique string to identify this portlet.\
**Portlet title** - title of the portlet, does not have to be unique.\
&#x20;

![](/files/-M-u4hRRaZMX1azpeUr7)

### Auto refresh

&#x20;Auto Refresh enables the portlet to refresh the data every SS:second.&#x20;

![](/files/-M-u4kZ7CDSZi6afo7Ut)

### Query configuration

Query Configuration enables the portlet to execute specified queries towards the chosen database connector.

* **Database connector** - Select which connector that the query will execute against.
* **Your query** - Text field where queries can be written
* **Data column name** - Select in which column the document data is stored.
* **Mime type column name** - Select in which column the mime type of the document is stored.
* **File name column** -Instead of mime type column name, choose this for formats such as ".jpg, .gif, .txt".
* **Default mime type** - Also an alternative if all documents share the same mime type one can define it here.

**Mime types are defined in the following format:** e.g *"application/pdf"*&#x20;

![](/files/-M-u4nKSJ5wokHJ_sY8t)

### Commands

Commands enables the portlet to listen for events sent by other portlets to execute specified commands. **The portlet will listen to the following commands**

* onRefresh
* onRowSelected
* onGenericTreeNodeSelection

**The portlet will listen to the following portlets** *Specify which portlet the commands above will trigger from*. The portlets that appears will be shown with their unique internal name.&#x20;

![](/files/-M-u4qIgBw2aw46xkIGw)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.novacuraflow.com/6.12/development/portal/portlets/generic-document-viewer-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
