This adds a view button for image and PDF files uploaded to ProcessMaker using the multiple file control.
The image viewer uses Viewer.js by Chen Fengyuan
The PDF viewer uses ViewerJS by KO GmbH
- Download the repo as a zip file and copy the Viewers folder to the ProcessMaker public folder e.g.
/opt/processmaker/workflow/public_html
- In the dynaform with the multiple file control, add the path to the Viewers.js file (
/Viewers/viewers.js
) to the external lib property of the dynaform. - Edit the JavaScript of the dynaform and invoke the
addViewers
function
ImageAndPDFViewer.addViewers();