title: Opening FDF local works, but not on server
body: <p>On my LOCALHOST, I have a form that creates and FDF file... Also in that file it includes a 'full-path' -> '<a href="http://localhost/example/example.pdf" rel="nofollow noreferrer">http://localhost/example/example.pdf</a>'....  So when I 'click the link' to open the FDF file within the browser, it loads the PDF with the FDF data inserted in the proper locations. </p>
  
  <p>When I do this on my Linux Server (not local), when I click the FDF file to open it, it just OPENS the file, and renders text (fdf file) to the screen instead of 'opening' the fdf file. </p>
  
  <p>Wondering if anyone can help me out with this process... I want to open the FDF file and so it opens the PDF file as well. </p>
  
  <p>This is some code that I have done, but i have commented out the 'headers'... as I didn't think I needed headers when 'opening' a file, rather than rendering one to screen?</p>
  
  <pre><code>    $fdf = new fdf();
      //$response = $fdf-&gt;fdfMerge(APP_ROOT."/forms/test/FormTest.pdf", $_POST);
      $response = $fdf-&gt;renderFDF(DOMAIN."forms/test/FormTest.pdf", $_POST, $_POST['userId'], $_POST['contactId']);
      //var_dump($response);
  
      // Link DIRECTLY to the FDF file... 
      echo "Internal: &lt;a href='". $response['internalPath'] ."'&gt;". $response['internalPath'] ."&lt;/a&gt;&lt;br /&gt;";
      echo "External: &lt;a href='". $response['externalPath'] ."'&gt;". $response['externalPath'] ."&lt;/a&gt;&lt;br /&gt;";
  
      /*
      if(ini_get('zlib.output_compression'))
           ini_set('zlib.output_compression', 'Off');
  
      header("Pragma: public"); // required
      header("Expires: 0");
      header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
      header("Cache-Control: private", false); // required for certain browsers
  
      header("Content-Type: application/x-download");
      header("Content-Disposition: attachment; filename=".$response['fdfFile'].";" );
  
      header("Content-Length: ".$filesize($response['fdfFile'])."");
      header("Content-Transfer-Encoding: binary");
  
      ob_clean();
      flush();
  
      fopen($response['fullPath']);
      */
  </code></pre>
  
  <p>--- BROWSER RESPONSE FROM LINUX BOX ---</p>
  
  <pre><code>%FDF-1.2
  %Ã¢Ã£ÃÃ“
  1 0 obj
  &lt;&lt; 
  /FDF &lt;&lt; /Fields [ &lt;&lt;/T(formId)/V(111)&gt;&gt;&lt;&lt;/T(userId)/V(23)&gt;&gt;&lt;&lt;/T(contactId)/V(2950)&gt;&gt;&lt;&lt;/T(firstName)/V(Justin)&gt;&gt;&lt;&lt;/T(lastName)/V(Geezer)&gt;&gt;&lt;&lt;/T(email)/V(justin@stickypages.ca)&gt;&gt;] 
  /F (https://www.example.com/forms/test/FormTest.pdf) /ID [ &lt;bd71513804f75900e899f3be924b69ef&gt;
  ] &gt;&gt; 
  &gt;&gt; 
  endobj
  trailer
  &lt;&lt;
  /Root 1 0 R 
  
  &gt;&gt;
  %%EOF
  </code></pre>
  
  <p>Here is a ScreenShot, when I use the "HEADER" responses.
  <img src="https://i.stack.imgur.com/odP1h.jpg" alt="enter image description here"></p>
  
  <hr>
  
  <p><em>Edit:</em> If I download the FDF file from the server, and 'double-click' to open the file, it downloads the PDF file from the web and opens it fine. </p>