diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 56e14ee748c..f4e12fd480f 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -640,7 +640,7 @@ print ''; print ''.$langs->trans("PDF_USE_A").''; //$pdfa = false; // PDF default version -$pdfa = getDolGlobalInt('PDF_USE_A', 3); // PDF/A-1 ou PDF/A-3 +$pdfa = getDolGlobalInt('PDF_USE_A', 0); // PDF/A-1 ou PDF/A-3 print $form->selectarray('PDF_USE_A', $arraylistofpdfformat, $pdfa); print ''; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 42c50d868e9..3e4c32493fd 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -181,7 +181,7 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') //$metric=$arrayformat['unit']; //$pdfa = false; // PDF default version - $pdfa = getDolGlobalInt('PDF_USE_A', 3); // PDF/A-1 ou PDF/A-3 + $pdfa = getDolGlobalInt('PDF_USE_A', 0); // PDF/A-1 ou PDF/A-3 if (!getDolGlobalString('MAIN_DISABLE_TCPDI') && class_exists('TCPDI')) { $pdf = new TCPDI($pagetype, $metric, $format, true, 'UTF-8', false, $pdfa); diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 2ef528c7b84..25eef494d2e 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -161,7 +161,7 @@ class BuildDocTest extends CommonClassTest // Crabe (english) $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of crabe invoice'); print __METHOD__." result=".$result." for generation from crabe\n"; // Restore default usage with TCPDI @@ -170,7 +170,7 @@ class BuildDocTest extends CommonClassTest // Crabe (english) $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of crabe invoice (MAIN_DISABLE_TCPDI=0 + watermark)'); print __METHOD__." result=".$result." for generation from crabe with MAIN_DISABLE_TCPDI and a watermark\n"; // Crabe (japanese) @@ -178,7 +178,7 @@ class BuildDocTest extends CommonClassTest $newlangs1->setDefaultLang('ja_JP'); $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $newlangs1); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of document ja_JP'); print __METHOD__." result=".$result."\n"; // Crabe (saudiarabia) @@ -186,7 +186,7 @@ class BuildDocTest extends CommonClassTest $newlangs2a->setDefaultLang('sa_SA'); $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $newlangs2a); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of document sa_SA'); print __METHOD__." result=".$result."\n"; // Crabe (english_saudiarabia) @@ -194,7 +194,7 @@ class BuildDocTest extends CommonClassTest $newlangs2b->setDefaultLang('en_SA'); $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $newlangs2b); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of document en_SA'); print __METHOD__." result=".$result."\n"; // Crabe (greek) @@ -202,7 +202,7 @@ class BuildDocTest extends CommonClassTest $newlangs3->setDefaultLang('el_GR'); $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $newlangs3); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of document el_GR'); print __METHOD__." result=".$result."\n"; // Crabe (chinese) @@ -210,7 +210,7 @@ class BuildDocTest extends CommonClassTest $newlangs4->setDefaultLang('zh_CN'); $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $newlangs4); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of document zh_CN'); print __METHOD__." result=".$result."\n"; // Crabe (russian) @@ -218,7 +218,7 @@ class BuildDocTest extends CommonClassTest $newlangs5->setDefaultLang('ru_RU'); $localobject->model_pdf = 'crabe'; $result = $localobject->generateDocument($localobject->model_pdf, $newlangs5); - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0, 'Error during the test of generation of document ru_RU'); print __METHOD__." result=".$result."\n"; return 0;