From bbf5ef0d7567a96a3045e70c0e87d2cf034a801e Mon Sep 17 00:00:00 2001 From: Aina Sitraka <35221835+aynsix@users.noreply.github.com> Date: Thu, 28 Apr 2022 18:22:05 +0300 Subject: [PATCH] PROD - PRINT - PDF - Generated pdf cant be printed even if no password is defined (#4008) * fix password * owner pass * fix --- lib/Alchemy/Phrasea/Out/Module/PDFRecords.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/lib/Alchemy/Phrasea/Out/Module/PDFRecords.php b/lib/Alchemy/Phrasea/Out/Module/PDFRecords.php index 6109f3bc90..e3efcec8ab 100644 --- a/lib/Alchemy/Phrasea/Out/Module/PDFRecords.php +++ b/lib/Alchemy/Phrasea/Out/Module/PDFRecords.php @@ -49,19 +49,9 @@ class PDFRecords extends PDF $this->thumbnailName = $printer->getThumbnailName(); $this->previewName = $printer->getPreviewName(); - $this->pdf->SetProtection([ - 'print', - 'modify', - 'copy', - 'annot-forms', - 'fill-forms', - 'extract', - 'assemble', - 'print-high', - 'owner' - ], - $userPassword - ); + if (!empty($userPassword)) { + $this->pdf->SetProtection([], $userPassword); + } $this->pdf->setPrintOwnerUser($app->getAuthenticatedUser());