From ee76deedd752c90f346daa108deb97615a0894ba Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 6 May 2015 16:42:43 +0200 Subject: [PATCH] functions --- lib/php/functions.php | 5 +++++ lib/php/page.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/php/functions.php b/lib/php/functions.php index f8338640..a7cbc4f9 100644 --- a/lib/php/functions.php +++ b/lib/php/functions.php @@ -48,6 +48,11 @@ function rtf2txt($rtf) { return cmd2str($cmd,$rtf); } +function rtf2html($rtf) { + $cmd="unrtf --html"; + return cmd2str($cmd,$rtf); +} + function html2pdf($html) { $cmd="iconv -f utf-8 -t iso-8859-1 -c|htmldoc --encryption --webpage --no-title --header '...' --footer '...'"; $cmd .= " -t pdf -"; diff --git a/lib/php/page.php b/lib/php/page.php index 56e564be..a7f35878 100644 --- a/lib/php/page.php +++ b/lib/php/page.php @@ -249,7 +249,7 @@ class Page { if (preg_match('/tml$/',$this->content_type)) { foreach ($this->to_array($this->css) as $v) { - $head .= ''.PHP_EOL; + $head .= ''.PHP_EOL; } if ($this->css_code) $head .= '' -- 2.47.3