fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11284] rental: let me know if wkhtmltopdf is missing


From: Sigurd Nes
Subject: [Fmsystem-commits] [11284] rental: let me know if wkhtmltopdf is missing
Date: Mon, 09 Sep 2013 11:09:28 +0000

Revision: 11284
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11284
Author:   sigurdne
Date:     2013-09-09 11:09:28 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
rental: let me know if wkhtmltopdf is missing

Modified Paths:
--------------
    trunk/rental/inc/class.uimakepdf.inc.php

Modified: trunk/rental/inc/class.uimakepdf.inc.php
===================================================================
--- trunk/rental/inc/class.uimakepdf.inc.php    2013-09-09 08:44:38 UTC (rev 
11283)
+++ trunk/rental/inc/class.uimakepdf.inc.php    2013-09-09 11:09:28 UTC (rev 
11284)
@@ -452,9 +452,14 @@
                        $_SESSION['contract_html'] = "";
                         
                        $pdf_file_name = $tmp_dir . 
"/temp_contract_".strtotime(date('Y-m-d')).".pdf";
+
                        //var_dump($config->config_data['path_to_wkhtmltopdf']);
                        //var_dump($GLOBALS['phpgw_info']);
                        $wkhtmltopdf_executable = 
$config->config_data['path_to_wkhtmltopdf'];
+                       if(!is_file($wkhtmltopdf_executable))
+                       {
+                               throw new Exception('wkhtmltopdf not configured 
correctly');                    
+                       }
                        $snappy = new SnappyPdf();
                        
//$snappy->setExecutable('/opt/portico/pe/rental/wkhtmltopdf-i386'); // or 
whatever else
                        $snappy->setExecutable($wkhtmltopdf_executable); // or 
whatever else




reply via email to

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