title: Failed without error message: wkhtmltopdf "--enable-javascript" "1" "--javascript-delay" "5000" "--enable-smart-shrinking" "1" "
body: <p>We all are trying to load a pdf with graph on it and send to email. However when trying to create a pdf file it shows error as failed with out error.</p>
  <p>We are using library called as : &quot;barryvdh/laravel-snappy&quot;: &quot;^1.0&quot;</p>
  <p>Have installed library called as wkhtml2pdf however still the issue remain same.</p>
  <p>Controller file :</p>
  <pre><code>    public function download()
      {
          $render = view('graph')-&gt;render();
          $pdf = new Pdf;
          $pdf-&gt;addPage($render);
          $pdf-&gt;setOptions([
              'enable-javascript' =&gt; true,
              'javascript-delay' =&gt; 5000,
              'enable-smart-shrinking' =&gt; true,
              'no-stop-slow-scripts' =&gt; true,
              'binary' =&gt; '&quot;C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf&quot;'
          ]);
          if(!$pdf-&gt;saveAs('D:/report.pdf')){
              return $pdf-&gt;getError();
          }
  
          
          return response()-&gt;download('D:report.pdf');
      }
  </code></pre>
  <p>Blade File:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;utf-8&quot;&gt;
      &lt;script src=&quot;https://www.google.com/jsapi&quot;&gt;&lt;/script&gt;
      &lt;style&gt;
          .pie-chart {
              width: 600px;
              height: 400px;
              margin: 0 auto;
          }
          .text-center{
              text-align: center;
          }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
    
  &lt;h2 class=&quot;text-center&quot;&gt;Generate PDF with Chart in Laravel&lt;/h2&gt;
    
  &lt;div id=&quot;chartDiv&quot; class=&quot;pie-chart&quot;&gt;&lt;/div&gt;
    
  &lt;div class=&quot;text-center&quot;&gt;
      &lt;a href=&quot;{{ route('download') }}&quot;&gt;Download PDF File&lt;/a&gt;
      &lt;h2&gt;ItSolutionStuff.com.com&lt;/h2&gt;
  &lt;/div&gt;
    
  &lt;script type=&quot;text/javascript&quot;&gt;
      window.onload = function() {
          google.load(&quot;visualization&quot;, &quot;1.1&quot;, {
              packages: [&quot;corechart&quot;],
              callback: 'drawChart'
          });
      };
    
      function drawChart() {
          var data = new google.visualization.DataTable();
          data.addColumn('string', 'Pizza');
          data.addColumn('number', 'Populartiy');
          data.addRows([
              ['Laravel', 33],
              ['Codeigniter', 26],
              ['Symfony', 22],
              ['CakePHP', 10],
              ['Slim', 9]
          ]);
    
          var options = {
              title: 'Popularity of Types of Framework',
              sliceVisibilityThreshold: .2
          };
    
          var chart = new google.visualization.PieChart(document.getElementById('chartDiv'));
          chart.draw(data, options);
      }
  &lt;/script&gt;
    
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>