title: KnpSnappyBundle - wkhtmltopdf: CSS/images are loaded but not scripts
body: <p>The style and the images for my generated PDF from HTML are well loaded but not the scripts.</p>
  
  <pre><code>twig:
          debug: '%kernel.debug%'
          strict_variables: '%kernel.debug%'
          form_themes: ['bootstrap_4_horizontal_layout.html.twig']
          globals:
              pathToWeb: "%kernel.project_dir%/web"
  
  knp_snappy:
      pdf:
          enabled:    true
          binary:     /usr/bin/wkhtmltopdf --javascript-delay 5000 --no-stop-slow-scripts --enable-javascript --debug-javascript --margin-top 0 --margin-bottom 0 --margin-left 0 --margin-right 0
          options:    []
  </code></pre>
  
  <p>DockerFile (wkhtmltopdf 0.12.3 with patched qt (I need it for headers and footers))</p>
  
  <pre><code>RUN apt-get install libssl1.0-dev -y
  RUN cd ~
  RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
  RUN tar vxf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz 
  RUN cp wkhtmltox/bin/wk* /usr/bin/
  </code></pre>
  
  <p>base.html.twig</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8" /&gt;
          &lt;title&gt;{% block title %}Meetings manager{% endblock %}&lt;/title&gt;
          {% block stylesheets %}
              &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"&gt;
              &lt;link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"&gt;
              &lt;link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet"&gt;
              &lt;link rel="stylesheet" href="{{ absolute_url(asset('css/navbar.css')) }}"&gt;
              &lt;link rel="stylesheet" href="{{ absolute_url(asset('css/general.css')) }}"&gt;
          {% endblock %}
          &lt;link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;/head&gt;
      &lt;body&gt;
          {% block body %}{% endblock %}
          &lt;script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"&gt;&lt;/script&gt;
          &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This template is then extended and images are then loaded, for example:</p>
  
  <pre><code>&lt;img style="width: 100%;" src="{{pathToWeb ~ asset('image/emargement_top.png') }}"&gt;
  </code></pre>
  
  <p>It looks like javascript can be executed, If I insert</p>
  
  <pre><code>&lt;script&gt;document.write("test");&lt;/script&gt;
  </code></pre>
  
  <p>It works, but not the other scripts.</p>
  
  <p>I tried</p>
  
  <pre><code>    &lt;script src="{{ absolute_url(asset('pdf/js/bootstrap.js')) }}"&gt;&lt;/script&gt;
      &lt;script src="{{ absolute_url(asset('pdf/js/jquery-3.3.1.js')) }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    &lt;script src="{{pathToWeb ~ asset('pdf/js/bootstrap.js')) }}"&gt;&lt;/script&gt;
      &lt;script src="{{pathToWeb ~ asset('pdf/js/jquery-3.3.1.js')) }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>It doesn't work either (I have put a local version of the scripts in the web folder as you can see)</p>
  
  <p>To sump up:</p>
  
  <ul>
  <li>CSS works (custom css and bootstrap css)</li>
  <li>Images works</li>
  <li>Javascript can be executed</li>
  <li>Jquery and bootstrap scripts are not loaded (the bootstrap grid is not working)</li>
  </ul>
  
  <p>Any ideas ?</p>