title: phptopdf.php generate pdf not working
body: <p>I'm converting php to pdf with <a href="http://phptopdf.com" rel="nofollow noreferrer">phptopdf</a>  and I successfully generate pdf with that library but after generate pdf it's not working any pdf reader including any browser except Mozilla Firefox.</p>
  
  <p>Generate pdf work only FF but I need to work atleast any pdf reader. I also tried online pdf reader but that's also not working.</p>
  
  <p>I tried this <a href="http://phptopdf.com/examples/#generate_pdf_invoice" rel="nofollow noreferrer">http://phptopdf.com/examples/#generate_pdf_invoice</a> snippet to generate pdf and also simple ones but none of working .</p>
  
  <blockquote>
    <p>Strange thing how generate pdf work only Mozilla Firefox why not any
    others ?</p>
  </blockquote>
  
  <pre><code>&lt;?php
   // INCLUDE THE phpToPDF.php FILE
  require("phpToPDF.php"); 
  
  // PUT YOUR HTML IN A VARIABLE
  $my_html="&lt;html lang=\"en\"&gt;
    &lt;head&gt;
      &lt;meta charset=\"UTF-8\"&gt;
      &lt;title&gt;Sample Invoice&lt;/title&gt;
      &lt;link rel=\"stylesheet\" href=\"http://phptopdf.com/bootstrap.css\"&gt;
      &lt;style&gt;
        @import url(http://fonts.googleapis.com/css?family=Bree+Serif);
        body, h1, h2, h3, h4, h5, h6{
        font-family: 'Bree Serif', serif;
        }
      &lt;/style&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;div class=\"container\"&gt;
        &lt;div class=\"row\"&gt;
          &lt;div class=\"col-xs-6\"&gt;
            &lt;h1&gt;
              &lt;a href=\"http://phptopdf.com\"&gt;            
              Logo here
              &lt;/a&gt;
            &lt;/h1&gt;
          &lt;/div&gt;
          &lt;div class=\"col-xs-6 text-right\"&gt;
            &lt;h1&gt;INVOICE&lt;/h1&gt;
            &lt;h1&gt;&lt;small&gt;Invoice #001&lt;/small&gt;&lt;/h1&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=\"row\"&gt;
          &lt;div class=\"col-xs-5\"&gt;
            &lt;div class=\"panel panel-default\"&gt;
              &lt;div class=\"panel-heading\"&gt;
                &lt;h4&gt;From: &lt;a href=\"#\"&gt;Your Name&lt;/a&gt;&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class=\"panel-body\"&gt;
                &lt;p&gt;
                  Address &lt;br&gt;
                  details &lt;br&gt;
                  more &lt;br&gt;
                &lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=\"col-xs-5 col-xs-offset-2 text-right\"&gt;
            &lt;div class=\"panel panel-default\"&gt;
              &lt;div class=\"panel-heading\"&gt;
                &lt;h4&gt;To : &lt;a href=\"#\"&gt;Client Name&lt;/a&gt;&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class=\"panel-body\"&gt;
                &lt;p&gt;
                  Address &lt;br&gt;
                  details &lt;br&gt;
                  more &lt;br&gt;
                &lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;!-- / end client details section --&gt;
        &lt;table class=\"table table-bordered\"&gt;
          &lt;thead&gt;
            &lt;tr&gt;
              &lt;th&gt;
                &lt;h4&gt;Service&lt;/h4&gt;
              &lt;/th&gt;
              &lt;th&gt;
                &lt;h4&gt;Description&lt;/h4&gt;
              &lt;/th&gt;
              &lt;th&gt;
                &lt;h4&gt;Hrs/Qty&lt;/h4&gt;
              &lt;/th&gt;
              &lt;th&gt;
                &lt;h4&gt;Rate/Price&lt;/h4&gt;
              &lt;/th&gt;
              &lt;th&gt;
                &lt;h4&gt;Sub Total&lt;/h4&gt;
              &lt;/th&gt;
            &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;Article&lt;/td&gt;
              &lt;td&gt;&lt;a href=\"#\"&gt;Title of your article here&lt;/a&gt;&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;-&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;$200.00&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;$200.00&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;Template Design&lt;/td&gt;
              &lt;td&gt;&lt;a href=\"#\"&gt;Details of project here&lt;/a&gt;&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;10&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;75.00&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;$750.00&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;Development&lt;/td&gt;
              &lt;td&gt;&lt;a href=\"#\"&gt;WordPress Blogging theme&lt;/a&gt;&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;5&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;50.00&lt;/td&gt;
              &lt;td class=\"text-right\"&gt;$250.00&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
        &lt;div class=\"row text-right\"&gt;
          &lt;div class=\"col-xs-2 col-xs-offset-8\"&gt;
            &lt;p&gt;
              &lt;strong&gt;
              Sub Total : &lt;br&gt;
              TAX : &lt;br&gt;
              Total : &lt;br&gt;
              &lt;/strong&gt;
            &lt;/p&gt;
          &lt;/div&gt;
          &lt;div class=\"col-xs-2\"&gt;
            &lt;strong&gt;
            $1200.00 &lt;br&gt;
            N/A &lt;br&gt;
            $1200.00 &lt;br&gt;
            &lt;/strong&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=\"row\"&gt;
          &lt;div class=\"col-xs-5\"&gt;
            &lt;div class=\"panel panel-info\"&gt;
              &lt;div class=\"panel-heading\"&gt;
                &lt;h4&gt;Bank details&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class=\"panel-body\"&gt;
                &lt;p&gt;Your Name&lt;/p&gt;
                &lt;p&gt;Bank Name&lt;/p&gt;
                &lt;p&gt;SWIFT : --------&lt;/p&gt;
                &lt;p&gt;Account Number : --------&lt;/p&gt;
                &lt;p&gt;IBAN : --------&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=\"col-xs-7\"&gt;
            &lt;div class=\"span7\"&gt;
              &lt;div class=\"panel panel-info\"&gt;
                &lt;div class=\"panel-heading\"&gt;
                  &lt;h4&gt;Contact Details&lt;/h4&gt;
                &lt;/div&gt;
                &lt;div class=\"panel-body\"&gt;
                  &lt;p&gt;
                    Email : you@example.com &lt;br&gt;&lt;br&gt;
                    Mobile : -------- &lt;br&gt;&lt;br&gt;&lt;br&gt;
                  &lt;/p&gt;
                  &lt;h4&gt;Payment should be made by Bank Transfer&lt;/h4&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;br&gt;&lt;br&gt;
        This is a sample invoice.&lt;br&gt;&lt;br&gt;
        In this example the css style is pulled from phptopdf.com/bootstrap.css
        You could also put all CSS in the header wrapped in &lt;xmp&gt; &lt; style &gt; &lt;/xmp&gt; tags
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;";
  
  // SET YOUR PDF OPTIONS -- FOR ALL AVAILABLE OPTIONS, VISIT HERE:  http://phptopdf.com/documentation/
  $pdf_options = array(
    "source_type" =&gt; 'html',
    "source" =&gt; $my_html,
    "action" =&gt; 'download',
    "file_name" =&gt; 'pdf_invoice.pdf');
  
  // CALL THE phpToPDF FUNCTION WITH THE OPTIONS SET ABOVE
  phptopdf($pdf_options);
  
  ?&gt; 
  </code></pre>
  
  <p>Any help will be appreciate.</p>