You are here

public function FrxWordDoc::render in Forena Reports 7.4

Same name and namespace in other branches
  1. 7.3 docformats/FrxWordDoc.inc \FrxWordDoc::render()

Overrides FrxDocument::render

File

docformats/FrxWordDoc.inc, line 13
FrxWordDoc.inc Word document exporter. @author davidmetzler

Class

FrxWordDoc
@file FrxWordDoc.inc Word document exporter. @author davidmetzler

Code

public function render($r, $format, $options = array()) {
  $css = $this
    ->loadCSSFiles($format);
  $output = '<html><head>';
  $output .= '<meta http-equiv="Content-Type" content="text/html"/>';
  if (isset($r->rpt_xml->head->style)) {
    $output .= '<style type="text/css">';
    $output .= $css;
    if (isset($r->rpt_xml->head->style)) {
      $sheet = (string) $r->rpt_xml->head->style;
      $output .= $sheet;
    }
    $output .= '</style>';
  }
  $output .= '<title>' . $r->title . '</title></head><body class="forena-report">' . $r->html . '</body></html>';
  return $output;
}