diff --git a/include/config.inc.example b/include/config.inc.example index 584dd211c..d3024056c 100644 --- a/include/config.inc.example +++ b/include/config.inc.example @@ -63,4 +63,8 @@ define ("dbname",""); // you can uncomment this // after replace NOALYSS_HOME by the path of the local installation of Noalyss // ini_alter("open_basedir", "/usr/bin:/tmp/:NOALYSS_HOME"); - \ No newline at end of file + +// In recent distribution linux, pdftk is a snap, you should set the path +// for exporting document in PDF +// $pdftk = /usr/bin/pdftk +// $pdftk = /snap/bin/pdftk diff --git a/include/constant.php b/include/constant.php index a5f2119a1..748d26496 100644 --- a/include/constant.php +++ b/include/constant.php @@ -271,7 +271,7 @@ if ( ! file_exists($ps2pdf) ) /** * Outil pour manipuler les PDF */ -$pdftk='/snap/bin/pdftk'; +if ( ! isset ($pdftk)) { $pdftk ='/usr/bin/pdftk'; } if (file_exists($pdftk)) { define ('PDFTK',$pdftk); diff --git a/include/lib/config_file.php b/include/lib/config_file.php index 3074fbddb..fcdb6021d 100644 --- a/include/lib/config_file.php +++ b/include/lib/config_file.php @@ -227,7 +227,10 @@ function display_file_config($p_array,$from_setup=1,$p_os=1) print ("// define ('OVERRIDE_PARAM',1);\r\n"); print ("// ini_set ('max_execution_time',240);\r\n"); print ("// ini_set ('memory_limit','256M');\r\n"); -// + print ("// In recent distribution linux, pdftk is a snap, you should set the path\r\n"); + print ("// for exporting document in PDF\r\n"); + print ("// \$pdftk = /usr/bin/pdftk \r\n"); + print ("// \$pdftk = /snap/bin/pdftk \r\n"); } /*!\brief create the config file