You are here

public function rtf::getDocument in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/rtf/rtf_export.inc \rtf::getDocument()
  2. 6 class_rtf.php \rtf::getDocument()
  3. 7.2 modules/rtf/rtf_export.inc \rtf::getDocument()

Ouput the RTF file.

File

modules/rtf/rtf_export.inc, line 234

Class

rtf

Code

public function getDocument() {
  $this->buffer .= "{";

  // Header.
  $this->buffer .= $this
    ->getHeader();

  // Font table.
  $this->buffer .= $this
    ->getFontTable();

  // Colour table.
  $this->buffer .= $this
    ->getColourTable();

  // File Information.
  $this->buffer .= $this
    ->getInformation();

  // Default font values.
  $this->buffer .= $this
    ->getDefaultFont();

  // Page display settings.
  $this->buffer .= $this
    ->getPageSettings();

  // Parse the text into RTF.
  $this->buffer .= $this
    ->parseDocument();
  $this->buffer .= "}";
  header("Content-Type: text/enriched\n");
  header("Content-Disposition: attachment; filename=rtf.rtf");
  echo $this->buffer;
}