diff --git a/htdocs/compta/paiement/cheque/pdf/pdf_blochet.class.php b/htdocs/compta/paiement/cheque/pdf/pdf_blochet.class.php index e10f6ca7ba4..7b759edfa67 100644 --- a/htdocs/compta/paiement/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/compta/paiement/cheque/pdf/pdf_blochet.class.php @@ -27,7 +27,7 @@ \version $Revision$ */ -require_once(FPDF_PATH.'fpdi_protection.php'); +require_once(FPDFI_PATH.'fpdi_protection.php'); /** @@ -220,16 +220,19 @@ class BordereauChequeBlochet $year = sprintf("%04d",$year); $_file = $dir . "bordereau-".$number.".pdf"; - $pdf = new FPDI_Protection('P','mm','A4'); - // Protection et encryption du pdf if ($conf->global->PDF_SECURITY_ENCRYPTION) { + $pdf = new FPDI_Protection('P','mm','A4'); $pdfrights = array('print'); // Ne permet que l'impression du document $pdfuserpass = ''; // Mot de passe pour l'utilisateur final $pdfownerpass = NULL; // Mot de passe du propriétaire, créé aléatoirement si pas défini $pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass); } + else + { + $pdf=new FPDI('P','mm',$this->format); + } $pdf->Open(); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index e4b4cbd2654..88c9b04edf0 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -187,6 +187,7 @@ $langs->setPhpLang($conf->global->MAIN_LANG_DEFAULT); */ // Les path racines if (! defined('FPDF_PATH')) { define('FPDF_PATH', DOL_DOCUMENT_ROOT .'/includes/fpdf/fpdf/'); } +if (! defined('FPDFI_PATH')) { define('FPDFI_PATH', DOL_DOCUMENT_ROOT .'/includes/fpdf/fpdfi/'); } if (! defined('PEAR_PATH')) { define('PEAR_PATH', DOL_DOCUMENT_ROOT .'/includes/pear/'); } if (! defined('PHP_WRITEEXCEL_PATH')) { define('PHP_WRITEEXCEL_PATH',DOL_DOCUMENT_ROOT .'/includes/php_writeexcel/'); } if (! defined('MAGPIERSS_PATH')) { define('MAGPIERSS_PATH', DOL_DOCUMENT_ROOT .'/includes/magpierss/'); } @@ -214,7 +215,7 @@ if (! defined('MAGPIE_CACHE_DIR')) { define('MAGPIE_CACHE_DIR', $conf->exte if (defined("MAIN_MODULE_TELEPHONIE") && MAIN_MODULE_TELEPHONIE) require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php"); // require_once(FPDF_PATH . "fpdf.php"); // dans le fichier pdfdetail_standard_modeles du module telephonie afin de pouvoir supprimer la ligne suivante -if (defined("MAIN_MODULE_TELEPHONIE") && MAIN_MODULE_TELEPHONIE) require_once(FPDF_PATH . "fpdi_protection.php"); +if (defined("MAIN_MODULE_TELEPHONIE") && MAIN_MODULE_TELEPHONIE) require_once(FPDFI_PATH . "fpdi_protection.php"); /*