title: KnpLabs/snappy bundle (wkhtmltopdf) not render Chart.js charts
body: <p>I trying to generate <code>PDF</code> with charts generated by <code>Chart.js</code> library 
  but javascript does not render at all.</p>
  
  <p>Do you see something I had missed?</p>
  
  <pre><code>   # config/packages/knp_snappy.yaml
      knp_snappy:
          pdf:
              enabled:    true
              binary:     '%env(WKHTMLTOPDF_PATH)%'
              options:
                debug-javascript: true
                enable-javascript: true
                javascript-delay: 200
                no-stop-slow-scripts: true
  
          image:
              enabled:    true
              binary:     '%env(WKHTMLTOIMAGE_PATH)%'
              options:    []
  </code></pre>
  
  <p><strong>PHP Symfony part</strong></p>
  
  <pre><code>    /**
       * Download pdf.
       *
       * @param string $slug
       * @param string $language
       *
       * @return Response
       *
       * @throws \Psr\Cache\CacheException
       * @throws \Psr\Cache\InvalidArgumentException
       */
      public function __invoke(string $slug, string $language): Response
      {
              $this-&gt;pdfFilesService-&gt;setPdfLanguage($language);
              $base64Images = $this-&gt;pdfFilesService-&gt;getBase64Images($slug);
              $profile      = $this-&gt;profileData-&gt;execute($slug, $language);
              $filename     = $profile['name'].'-report.pdf';
              $path         = $this-&gt;parameterBag-&gt;get('app.private_pdf_storage').'/'.$filename;
  
              $html = $this-&gt;templating-&gt;render('download_pdf.twig', \array_merge($base64Images, [
                  'profile'     =&gt; $profile,
                  'language'    =&gt; $language,
              ]));
  
  
              $this-&gt;pdf-&gt;generateFromHtml([$html], $path, [], true);
  
              return new Response(
                  $path,
                  200,
                  [
                      'Content-Type'        =&gt; 'application/pdf',
                      'Content-Disposition' =&gt; 'inline; filename="'.$path.'"',
                  ]
              );
  
      }
  </code></pre>
  
  <p><strong>Twig</strong></p>
  
  <pre><code>   &lt;section&gt;
         &lt;div id="barMulti"&gt;&lt;/div&gt;
     &lt;/section&gt;
     &lt;script type="text/javascript" src="{{ chartJs }}"&gt;&lt;/script&gt;
     &lt;script type="text/javascript"&gt;
        function getDataMulti(type) {
           return {
              // The type of chart we want to create
              type,
  
              // The data for our dataset
              data: {
                 labels: [ ... ],
                 datasets: [
                    {
                       backgroundColor: "#F4F7F9",
                       data: [3,7,4,5,5,2,6,8,9,7]
                    },
                    {
                       backgroundColor: "#66C4E0",
                       data: [3,7,4,5,5,2,6,8,9,7]
                    },
                    {
                       backgroundColor: "#009DCD",
                       data: [3,7,4,5,5,2,6,8,9,7]
                    },
                 ]
              },
  
              // Configuration options go here
              options: {
                 legend: {
                    display: false,
                 },
                 animation: {
                    duration: 0
                 },
                 scales: {
                    yAxes: [{
                       gridLines: {
                          color: "#454D57",
                       },
                       ticks: {
                          padding: 20,
                          fontStyle: 'bold',
                          fontColor: '#F4F7F9',
                          min: 0,
                          max: 100,
                       }
                    }],
                    xAxes: [
                       {
                          gridLines: {
                             color: "#454D57"
                          },
                          ticks: {
                             fontStyle: 'bold',
                             fontColor: '#F4F7F9',
                             padding: 20,
                             callback: function(label) {
                                if (/\s/.test(label)) {
                                   return label.split(" ");
                                }
  
                                return label;
                             }
                          }
                       }
                    ]
                 }
              }
           }
        }
  
        // var barMulti = document.getElementById('barMulti');
        var barMulti = document.getElementById('barMulti');
        new Chart(barMulti, getDataMulti('bar'));
     &lt;/script&gt;
  </code></pre>