[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 36/46: get the output with transform2pdf in c
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 36/46: get the output with transform2pdf in case it fails |
Date: |
Tue, 13 Jul 2021 05:02:01 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 38bcc36789215319612c423670b47a98a22bbce2
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Jun 24 14:25:35 2021 +0200
get the output with transform2pdf in case it fails
---
include/class/document.class.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/class/document.class.php b/include/class/document.class.php
index 28e618b..ff3bdba 100644
--- a/include/class/document.class.php
+++ b/include/class/document.class.php
@@ -1860,10 +1860,12 @@ class Document
mkdir($dirname);
$destination_file=$dirname."/".$this->d_filename;
$this->export_file($destination_file);
-
+ ob_start();
passthru(OFFICE . escapeshellarg($destination_file), $status);
+ $result =ob_get_contents();
+ ob_clean();
if ($status != 0) {
- \record_log(__FILE__."DOC45 : Error cannot transform into PDF");
+ \record_log(__FILE__."DOC45 : Error cannot transform into PDF"."
output [$result]");
throw new \Exception("DOC45 Cannot not transform to PDF");
}
// remove extension
- [Noalyss-commit] [noalyss] 24/46: Task #0001974: Duplication d'opération – Inclure l'intitulé, (continued)
- [Noalyss-commit] [noalyss] 24/46: Task #0001974: Duplication d'opération – Inclure l'intitulé, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 33/46: If database connx failed then reload the form, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 12/46: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 22/46: Cosmetic, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 26/46: Typo menu, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 28/46: Task #0002015: Export CSV depuis ANCGL : ajout de colonnes, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 29/46: Use autoload, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 31/46: Module decrease font-size, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 32/46: Code Cleaning #0002022: Utilisation d'un autoloader, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 35/46: Update Translation, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 36/46: get the output with transform2pdf in case it fails,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 41/46: Cosmetic #0002033: Alignement totaux + Trésorerie -> Financier/banque, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 42/46: Typo , debug information, jQuery available, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 43/46: check that g_user exists and not the g_theme, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 46/46: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 45/46: Cosmetic : unwanted char in operation detail, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 37/46: Manage_Table show header even if table empty, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 13/46: Forecast : protect against empty name, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 14/46: Bug simple report : FROM 00.0000 was computed from user preference instead of end period. Improve ergonomy, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 25/46: Cosmetic : appearance h2.info, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 30/46: fix bug, Dany De Bontridder, 2021/07/13