BUG 7344 Feature -> PDF Security settings

With this settings is possible to setup security for a PDF generated (Output Document).
In Output Document setup there is a new section available when the output document is either PDF or BOTH with the following fields:
Permissions: Must select wich permissions will be granted (if none is selected only VIEW is allowed)
Open Password: Is the password requested to open the document. (This open the document with selected permissions)
Owner Password: Is the password that allow owner to open and change permissions
This commit is contained in:
Hugo Loza
2011-07-29 17:46:22 -04:00
parent b47d9fa01e
commit daf7ac09b1
16 changed files with 844 additions and 258 deletions

View File

@@ -429,10 +429,13 @@
$aOD['OUT_DOC_BOTTOM_MARGIN'] = '15';
$aProperties['media']=$aOD['OUT_DOC_MEDIA'];
$aProperties['margins']=array('left' => $aOD['OUT_DOC_LEFT_MARGIN'], 'right' => $aOD['OUT_DOC_RIGHT_MARGIN'], 'top' => $aOD['OUT_DOC_TOP_MARGIN'], 'bottom' => $aOD['OUT_DOC_BOTTOM_MARGIN'],);
$aProperties['margins']=array('left' => $aOD['OUT_DOC_LEFT_MARGIN'], 'right' => $aOD['OUT_DOC_RIGHT_MARGIN'], 'top' => $aOD['OUT_DOC_TOP_MARGIN'], 'bottom' => $aOD['OUT_DOC_BOTTOM_MARGIN']);
if($aOD['OUT_DOC_PDF_SECURITY_ENABLED']=='1'){
$aProperties['pdfSecurity']=array('openPassword'=>$aOD['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'],'ownerPassword'=>$aOD['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'],'permissions'=>$aOD['OUT_DOC_PDF_SECURITY_PERMISSIONS']);
}
$oOutputDocument->generate( $_GET['UID'], $Fields['APP_DATA'], $pathOutput,
//$sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean)$aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'],$aProperties );
$sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean)$aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'] );
$sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean)$aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'],$aProperties );
//$sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean)$aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'] );
break;
case 'JRXML' :
//creating the xml with the application data;