From 5554de1a68cef997b99bca967d2a9b4820910f45 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Oct 2007 21:09:55 +0000 Subject: [PATCH] =?UTF-8?q?L'utilisation=20de=20l'encryption=20PDF=20ne=20?= =?UTF-8?q?consomme=20que=20500ko=20de=20plus=20pour=20un=20total=20de=201?= =?UTF-8?q?1M=20au=20lieu=20de=2010.5M=20de=20m=E9moire.=20Je=20modifie=20?= =?UTF-8?q?le=20warning=20car=20les=20pb=20m=E9moire=20sont=20un=20pb=20gl?= =?UTF-8?q?obal=20et=20non=20propre=20au=20cryptage=20des=20pdf.=20Un=20wa?= =?UTF-8?q?rning=20recommandant=2016Mo=20pour=20l'utilisation=20de=20dolib?= =?UTF-8?q?arr=20est=20affic=E9h=20=E0=20l'install.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/company.php | 6 ++++-- htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/fr_FR/admin.lang | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 37ccdb9d8dc..290162ae715 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -70,7 +70,9 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') // Create thumbs of logo if ($isimage > 0) { - $imgThumbSmall = vignette($conf->societe->dir_logos.'/'.$original_file, 200, 100, '_small',80); + $quality = 80; + + $imgThumbSmall = vignette($conf->societe->dir_logos.'/'.$original_file, 200, 100, '_small', $quality); if (eregi('([^\\\/:]+)$',$imgThumbSmall,$reg)) { $imgThumbSmall = $reg[1]; @@ -79,7 +81,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') else dolibarr_syslog($imgThumbSmall); // Création de la vignette de la page "Société/Institution" - $imgThumbMini = vignette($conf->societe->dir_logos.'/'.$original_file, 100, 30, '_mini',80); + $imgThumbMini = vignette($conf->societe->dir_logos.'/'.$original_file, 100, 30, '_mini', $quality); if (eregi('([^\\\/:]+)$',$imgThumbMini,$reg)) { $imgThumbMini = $reg[1]; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a305ffa8908..e4be3d4c604 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -114,7 +114,7 @@ DoNotStoreClearPassword=Do no store clear passwords in database MainDbPasswordFileConfEncrypted=Password of the database encrypted in conf.php ConfigFileIsInReadOnly=The file conf.php is in read only, check the rights. ProtectAndEncryptPdfFiles=Protection and encryption of the pdf generated -ProtectAndEncryptPdfFilesDesc=protecting a document requires to encrypt it, which increases the processing time a lot.
This can cause a PHP time-out in some cases, especially if the document contains images or fonts.

You can solve this problem by increasing the variable memory_limit with 16M in the php.ini, or if you do not have access to the php.ini, create a .htaccess in root of the site and add this line:

php_value memory_limit 16M


+ProtectAndEncryptPdfFilesDesc=Protection of a PDF document keep this one free to read and print with any PDF browser. However, editing and copying is no more possible. Feature=Feature DolibarrLicense=License DolibarrProjectLeader=Project leader diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index e3da41b86da..3159b8e30be 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -114,8 +114,7 @@ DoNotStoreClearPassword=Ne pas stocker de mot de passe en clair dans la base MainDbPasswordFileConfEncrypted=Encrypter le mot de passe de la base dans le fichier conf.php ConfigFileIsInReadOnly=Le fichier conf.php est lecture seule, vérifiez les droits d'écriture. ProtectAndEncryptPdfFiles=Protection et encryption des pdf générés -ProtectAndEncryptPdfFilesDesc=La protection d'un document pdf exige son encryption, ce qui peut augmenter la durée de la transformation. Ceci peut causer un arrêt de PHP dans certains cas, particulièrement si le document contient des images ou des polices.

Vous pouvez résoudre ce problème en augmentant la variable memory_limit à 16M dans php.ini ou, si vous n'avez pas accès au php.ini, créer un .htaccess à la racine du site et ajouter cette ligne :

php_value memory_limit 16M


-Feature=Fonction +ProtectAndEncryptPdfFilesDesc=La protection d'un document pdf laisse le document libre à la lecture et à l'impression avec tout logiciel de lecture PDF. Par contre, la modification et la copie deviennent impossible. DolibarrLicense=Licence DolibarrProjectLeader=Chef de projet OtherDeveloppers=Autres développeurs/contributeurs