Document viewer

Document viewer can be used to present documents to the users. Document viewer supports showing documents in PDF format and most commonly used image formats.

If a format is not supported, the user will have to possibility to download the document instead.

General

General data is required for all portlets.

General configuration

Listeners

The portlet can listen to the following events:

  • On Row Selection

  • On Point Selection

Listeners configuration

Data

Data source

The portlet data source configuration enables the portlet to execute specified queries towards the chosen database connector to fetch data, or fetch data from a workflow.

  • Database: uses a flow connector to retrieve data from a database

  • Workflow: runs a workflow to retrieve data

Data source configuration

Workflow source configuration

Binary workflow

When fetching large PDF files, using a binary workflow for data retrieval is more efficient. This binary workflow complements the data source configuration. The document identifier (filename) is obtained through the data source query/workflow, but the data is fetched using the binary workflow.

When Binary workflow data (PDF) is configured with a workflow, this workflow will be used to fetch PDF data. To not fetch the PDF data twice the data source query/workflow should be written to leave the PDF data empty.

Note that if the data source query/workflow output contains both images and PDFs, only the data for PDFs should be left empty.

Example set-up

  1. Create a binary workflow in the Studio; Machine Workflow with output set to Binary output (Stream)

  2. Configure the binary workflow.

  3. In the Document viewer portlet configure the data source. Make sure that the data source fetches the filename but not the data for PDF files.

  4. Map the binary workflow in Binary Workflow Data (PDF)

Presentation

Data: optional for binary workflow

Filename: name of the file

Style

Change the header text color and add a header stripe by configuring style.

Style configuration

Last updated