title: dompdf creates defective pdf on wordpress
body: <p>I want to create a pdf on my wordpress homepage with dompdf. Local an my computer with xampp there is no problem, all works fine.
  On wordpress I am using the plugin "PHP Code For Posts". The dompdf folder I copied to the folder of the plugin.
  The pdf get created but it is defective.</p>
  
  <pre><code>&lt;?php
  
  if(isset($_POST['button']))
  {
      require_once("dompdf/dompdf_config.inc.php");
      spl_autoload_register('DOMPDF_autoload');
  
      function pdf_create($filename, $paper, $orientation, $stream=TRUE)  
      {
          $dompdf = new DOMPDF();
          $dompdf-&gt;set_paper($paper, $orientation);
          $dompdf-&gt;load_html('TEST');
          $dompdf-&gt;render();
          $dompdf-&gt;stream($filename.".pdf");
      }
  
      $filename = 'file_name';
      $dompdf = new DOMPDF();
      pdf_create($filename, 'A4', 'portait');  
  }
  
  ?&gt;
  
  &lt;form method="post" &gt;
      &lt;p&gt;Test: &lt;input type="text" name="price" /&gt;&lt;/p&gt;
      &lt;p&gt;&lt;input type="submit" name="button" value="PDF" /&gt;&lt;/p&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>I hope anybody can help me. I have no idea why it works local and on wordpress it creates a defective file.</p>
  
  <p>UPDATE:</p>
  
  <p>Here is the code when I open the defective file with notepad.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html lang="de-DE"&gt;
  
  &lt;head&gt;
  
  
  &lt;meta charset="UTF-8"&gt;
  
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
  &lt;link rel="profile" href="http://gmpg.org/xfn/11"&gt;
  
  &lt;link rel="pingback" href="http://test-homepage.de/xmlrpc.php"&gt;
  
  
  &lt;!--[if lt IE 9]&gt;
  &lt;script src="http://test-homepage.de/wp-content/themes/zerif-pro/js/html5.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="http://test-homepage.de/wp-content/themes/zerif-pro/css/ie.css" type="text/css"&gt;
  &lt;![endif]--&gt;
  
  &lt;title&gt;Test &amp;#8211; test-homepage&lt;/title&gt;
  &lt;link rel="alternate" type="application/rss+xml" title="test-homepage &amp;raquo; Feed" href="http://test-homepage.de/feed/" /&gt;
          &lt;script type="text/javascript"&gt;
              window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/test-homepage.de\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.5.3"}};
  </code></pre>