get the output with transform2pdf in case it fails
This commit is contained in:
parent
6e6f93b7ca
commit
38bcc36789
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue