PROD - PRINT - PDF - Generated pdf cant be printed even if no password is defined (#4008)

* fix password

* owner pass

* fix
This commit is contained in:
Aina Sitraka
2022-04-28 18:22:05 +03:00
committed by GitHub
parent f004015f64
commit bbf5ef0d75

View File

@@ -49,19 +49,9 @@ class PDFRecords extends PDF
$this->thumbnailName = $printer->getThumbnailName(); $this->thumbnailName = $printer->getThumbnailName();
$this->previewName = $printer->getPreviewName(); $this->previewName = $printer->getPreviewName();
$this->pdf->SetProtection([ if (!empty($userPassword)) {
'print', $this->pdf->SetProtection([], $userPassword);
'modify', }
'copy',
'annot-forms',
'fill-forms',
'extract',
'assemble',
'print-high',
'owner'
],
$userPassword
);
$this->pdf->setPrintOwnerUser($app->getAuthenticatedUser()); $this->pdf->setPrintOwnerUser($app->getAuthenticatedUser());