]> git.nbdom.net Git - nb.git/commitdiff
functions
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 6 May 2015 14:42:43 +0000 (16:42 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 6 May 2015 14:42:43 +0000 (16:42 +0200)
lib/php/functions.php
lib/php/page.php

index f83386406d9df5a14b42b813cdabc19a02caa217..a7cbc4f93ac9a846bba733280cd2551a44e687d8 100644 (file)
@@ -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 -";
index 56e564befd08802156036d9a9e1ea2ef2cd7d8b4..a7f35878d52f75032d40aeeeea4589dc9411469d 100644 (file)
@@ -249,7 +249,7 @@ class Page {
       if (preg_match('/tml$/',$this->content_type)) {
 
         foreach ($this->to_array($this->css) as $v) {
-          $head .= '<link rel="stylesheet" href="' . $v . '" />'.PHP_EOL;
+          $head .= '<link type="text/css" rel="stylesheet" href="' . $v . '" />'.PHP_EOL;
         }
 
         if ($this->css_code) $head .=  ''