noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 27/107: Improve : depending if pdftk is a sna


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 27/107: Improve : depending if pdftk is a snap or not , his path must be a setting
Date: Mon, 26 Aug 2019 10:31:50 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 20c489450e88230371fd0cfd376d6c4bd5a14cd4
Author: Dany De Bontridder <address@hidden>
Date:   Mon Jun 24 16:57:03 2019 +0200

    Improve : depending if pdftk is a snap or not ,
    his path must be a setting
---
 include/config.inc.example  | 6 +++++-
 include/constant.php        | 2 +-
 include/lib/config_file.php | 5 ++++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/config.inc.example b/include/config.inc.example
index 584dd21..d302405 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 a5f2119..748d264 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 3074fbd..fcdb602 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]