From 26c50b9e2ca2c43ab20ce786e39310fd5d481875 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 15 Oct 2021 11:59:12 +0200 Subject: [PATCH] add setting to create PDF in PDF/A - 1b format #18990 --- htdocs/admin/pdf.php | 12 ++++++++++++ htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 13 insertions(+) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index be45a2101f5..a245c9338c9 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -165,6 +165,10 @@ if ($action == 'update') { dolibarr_set_const($db, "PDF_SHOW_LINK_TO_ONLINE_PAYMENT", GETPOST('PDF_SHOW_LINK_TO_ONLINE_PAYMENT', 'alpha'), 'chaine', 0, '', $conf->entity); } + if (GETPOSTISSET('PDF_USE_1A')) { + dolibarr_set_const($db, "PDF_USE_1A", GETPOST('PDF_USE_1A', 'alpha'), 'chaine', 0, '', $conf->entity); + } + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); @@ -534,6 +538,14 @@ if ($conf->use_javascript_ajax) { } print ''; +print ''.$langs->trans("PDF_USE_1A").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('PDF_USE_1A'); +} else { + print $form->selectyesno('PDF_USE_1A', (!empty($conf->global->PDF_USE_1A)) ? $conf->global->PDF_USE_1A : 0, 1); +} +print ''; + print ''; print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index def603e653e..81034e4aacd 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2194,3 +2194,4 @@ LanguageAndPresentation=Language and presentation SkinAndColors=Skin and colors IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sales tax IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sales tax +PDF_USE_1A=Generate PDF with PDF/A- 1b format