noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/01: check that the status of the force con


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/01: check that the status of the force convert to PDF
Date: Fri, 29 Jan 2016 09:46:25 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit e7d991e3cc7dd834505bba41157c9c31ca83a412
Author: Dany De Bontridder <address@hidden>
Date:   Fri Jan 29 10:39:02 2016 +0100

    check that the status of the force convert to PDF
---
 include/class/class_document_export.php |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/class/class_document_export.php 
b/include/class/class_document_export.php
index f4ce0ed..1eb78d6 100644
--- a/include/class/class_document_export.php
+++ b/include/class/class_document_export.php
@@ -150,7 +150,14 @@ class Document_Export
             // transform gif file to pdf with convert tool
             $stmt = CONVERT_GIF_PDF . " " . 
escapeshellarg($this->store_convert . '/' . 'stamp.gif') . " " . 
escapeshellarg($this->store_convert . '/stamp.pdf');
             passthru($stmt, $status);
-
+            if ($status <> 0)
+            {
+                $this->feedback[$cnt_feedback]['file'] = 'stamp.pdf';
+                $this->feedback[$cnt_feedback]['message'] = ' cannot convert 
to PDF';
+                $this->feedback[$cnt_feedback]['error'] = $status;
+                $cnt_feedback++;
+                continue;
+            }
             //-----------------------------------
             // Fix broken PDF , actually pdftk can not handle all the PDF
             if ( define ('FIX_BROKEN_PDF') == 'YES' ) {
@@ -160,8 +167,8 @@ class Document_Export
             }
             if ($status <> 0)
             {
-                $this->feedback[$cnt_feedback]['file'] = 'stamp.pdf';
-                $this->feedback[$cnt_feedback]['message'] = ' cannot convert 
to PDF';
+                $this->feedback[$cnt_feedback]['file'] = $this->store_convert 
. '/' . $file_pdf;
+                $this->feedback[$cnt_feedback]['message'] = ' cannot force to 
PDF';
                 $this->feedback[$cnt_feedback]['error'] = $status;
                 $cnt_feedback++;
                 continue;



reply via email to

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