Document viewer
Last updated
Last updated
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 data is required for all portlets.
The portlet can listen to the following events:
On Row Selection
On Point Selection
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
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.
Create a binary workflow in the Studio; Machine Workflow with output set to Binary output (Stream)
Configure the binary workflow.
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.
Map the binary workflow in Binary Workflow Data (PDF)
Data: optional for binary workflow
Filename: name of the file
Change the header text color and add a header stripe by configuring style.