Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By azalea45
#829260
Greetings All,

It has a long while since doing any work with processmaker and our main processmaker developer has moved on to greener pastures. :(

There has been a legislative change that requires all documents with certain confidential information to be password protected.

The company made a decision that one of the fields on the dynaform will be used as the document password the password. In this case the field name is "IDNo".

All output documents are generated via a trigger.

I have seen that it is possible to password protect an output document but it has a standard password, e.g. "Password" but the password cannot change for each document recipient, e.g. recipient 1, with IDNo 123 will have document password 123, recipient 2, with IDNo 456 will have document password 456 .

Is it possible to do this and if so, can somebody provide some guidance or assistance?

I hope that this make sense.

Kind Regards,
Aza
By azalea45
#829272
Dear All,
As per my post above I have spend some time trying to find/implement a solution and came up with the following solution but I seem to be missing something. The documents are being generated but the security is not being applied.
Code: Select all
$docId = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

@=PDFSecurity = array (
'enabled' => 1,
'openPassword' => @@IdNo,
'ownerPassword' => 'password123',
'permissions' => 'print|copy',
);


PMFGenerateOutputDocument($docId,@@APPLICATION,null,null,@=PDFSecurity);
When I was looking at the PMFGenerateOutputDocument function in the wiki there are 4 variables that can be used however the proposed solution has 5. What do I need do so that the @=PDFSecurity array is applied when the document is created?

Thanks
Aza

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]