From: Nicolas Boisselier Date: Wed, 6 May 2015 14:42:43 +0000 (+0200) Subject: functions X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=ee76deedd752c90f346daa108deb97615a0894ba;p=nb.git functions --- 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 .= ''