title: TYPO3 Extension: Generate a PDF
body: <p>Im trying to make an extension with Kickstarter that overrides the normal rendering of the page, and renders a PDF file. For this im using FPDF. But im not sure how to do it. I tried doing this, but it didnt work:</p>
  
  <pre><code>&lt;?php
  
  // require_once(PATH_tslib . 'class.tslib_pibase.php');
  
  class tx_ishurkunde_pi1 extends tslib_pibase {
      public $prefixId      = 'tx_ishurkunde_pi1';
      public $scriptRelPath = 'pi1/class.tx_ishurkunde_pi1.php';
      public $extKey        = 'ish_urkunde';
      public $pi_checkCHash = TRUE;
  
      public function main($content, array $conf) {
  
          if (!t3lib_extMgm::isLoaded('fpdf')) return "Error!";
  
          $pdf = new FPDF();
          $pdf-&gt;AddPage();
          $content = $pdf-&gt;Output('', 'S');
          return $content;
  
      }
  }
  ?&gt;
  </code></pre>
  
  <p>It still keeps rendering the normal web template. What am I missing?</p>
  
  <p>FYI, Im not trying to render the HTML as PDF. Im trying to generate a PDF from scratch, using the URL parameters are text variables.</p>