Fix: json format in llx_const

This commit is contained in:
Regis Houssin 2018-04-14 15:17:51 +02:00
parent 25a87507b9
commit 732f019fb2

View File

@ -150,14 +150,14 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
*/
// For TCPDF, we specify permission we want to block
$pdfrights = (! empty($conf->global->PDF_SECURITY_ENCRYPTION_RIGHTS)?$conf->global->PDF_SECURITY_ENCRYPTION_RIGHTS:array('modify','copy'));
$pdfrights = (! empty($conf->global->PDF_SECURITY_ENCRYPTION_RIGHTS)?json_decode($conf->global->PDF_SECURITY_ENCRYPTION_RIGHTS, true):array('modify','copy')); // Json format in llx_const
// For encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit
$encstrength = (! empty($conf->global->PDF_SECURITY_ENCRYPTION_STRENGTH)?$conf->global->PDF_SECURITY_ENCRYPTION_STRENGTH:0);
// Array of recipients containing public-key certificates ('c') and permissions ('p').
// For example: array(array('c' => 'file://../examples/data/cert/tcpdf.crt', 'p' => array('print')))
$pubkeys = (! empty($conf->global->PDF_SECURITY_ENCRYPTION_PUBKEYS)?$conf->global->PDF_SECURITY_ENCRYPTION_PUBKEYS:null);
$pubkeys = (! empty($conf->global->PDF_SECURITY_ENCRYPTION_PUBKEYS)?json_decode($conf->global->PDF_SECURITY_ENCRYPTION_PUBKEYS, true):null); // Json format in llx_const
$pdfuserpass = ''; // Password for the end user
$pdfownerpass = NULL; // Password of the owner, created randomly if not defined