Image and PDF Viewer for ProcessMaker Multiple File Uploader

'dipo majekodunmi
dipoleDIAMOND
Published in
1 min readNov 18, 2017
ProcessMaker multiple file uploader with Image and PDF viewer buttons added

A question I get asked often when presenting ProcessMaker features is “Is it possible to view the attached files without downloading it?”. My answer usually goes something like “Yes! ProcessMaker can be customised to use a viewer to display the attachment.”.

On a recent project, the question came up again and I decided to create something that can be easily reused for viewing image and PDF attachments. To meet the requirements, I had to find a viewer library for PDF and Images and thankfully I found two good ones.

Libraries

PDF — ViewerJS (http://viewerjs.org/)

Image — Viewer.js (https://fengyuanchen.github.io/viewerjs/)

The Integration

I placed both viewers in a folder and wrote a function using jQuery to add a new button to the multiple file control rows as shown in the video below.

The code is available on github

You are welcome to help improve it. I have only tested this with ProcessMaker 3.2.1.

--

--