Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

By heemalkumar
Good Day All,
I am trying to figure out a way the form attached to the last Task prints to PDF by itself and gets saved somewhere.
Please advise how this could be done.

Many Thanks.
By amosbatto
You need to create an Output Document with the variables used in your DynaForm in its template. Then, you can use a trigger to generate a PDF of the Output Document and then copy that PDF to a location. See example 3 in PMFGenerateOutputDocument().

Remember that if you fire a trigger immediately after a DynaForm, then the variables in that DynaForm have not yet been saved to the database, so you need to use PMFSendVariables() to save those variables (see the example). The other option is to fire the trigger before the next step in the task (or before assignment if the last step in the task), when the variables have been saved to the database.

If you don't want to use a trigger, then simply set the Output Document as a step in a task and let the user download the file and manually store the PDF file.
By heemalkumar
Thanks Amos.
I would like my Dynaform to print to PDF just the way the user sees it when they were actioning a task. Would that be possible?
By amosbatto
ProcessMaker provides an option to show a print button on DynaForms, which will generate a PDF similar to an Output Document.
printFormProperty.png (27.14 KiB) Viewed 1347 times
It appears in the upper right hand corner of the DynaForm:
PrintUpperCorner.png (12.51 KiB) Viewed 1347 times
If clicked, then it opens a print dialog box for your operating system:
PrintIconUpperRightCorner.png (28.78 KiB) Viewed 1345 times
But it creates a PDF file without formatting:
PDFGeneratedFromScreen.png (18.5 KiB) Viewed 1347 times
If you want to automatically open the print dialog box when the DynaForm is submitted, then add this JavaScript code to your DynaForm:
Code: Select all
var printed = false;
getFormById( $("form").prop("id") ).setOnSubmit( function() {
  if (printed == false) {
     printed = true;
     return false;
The problem is if you want the PDF to have the same style as your DynaForm. You can use an outside library like html2canvas, that creates a screenshot based on the DOM. I haven't tried it, so I don't know if it will render all the CSS correctly. There are also many plugins to take screenshots of web browsers. For example: ... re-addons/
There is no way (that I know) to use JavaScript with these plugins to take a screenshot of your DynaForm, so you have to rely on the user to do it manually.
By amosbatto
We don't have a plugin to take screenshots in PM. Your best bet is to use html2canvas or a similar library.
By heemalkumar
Hi Amos,
So I have an issue now. I have an image appearing on my Dynaform.
Image goes from task to task properly and appears. however, when I am trying to Print the Dynaform to PDF, the image disappears. I am using the print button on Process Maker.
But when I just do a Ctrl+P, then the image does show up.

Would you know why that happens.
Attached screenshot.
(256.35 KiB) Downloaded 41 times
By amosbatto
Is your image a digital signature? If so, which digital signature (SigPlus, E-Lock or DocuSign)?
By amosbatto
PM doesn't have an integration with Topaz Systems. Are you implementing this in a Panel control in your DynaForm?

You should contact Topaz Systems and ask them if there is a way to save their digital signature as a graphics file. If so, you can fire a trigger after the DynaForm which uses the PMFAddInputDocument() function to add the signature graphics file as an Input Document. If the graphics file is only saved on the local PC, then you will have to upload the file to the PM server. See: ... ding_Files

Then, your next step in the task can be an Output Document which contains:
<img src="/path/to/signature/file.jpg">

If Topaz Systems doesn't provide a way to save the digital signature as a graphics file, then you will have to use a web browser screenshot plugin like FireShot.

Hi Amo, I was using PM 3.2.2, and in my process, […]

(+91-9876425548) How can we bring back our ex by d[…]

(+91-9876425548) Indian Astrologer Get EX Love bri[…]


Hi in PM 3.0 GA community edition Is there a way t[…]