title: How to load CSS and images with KnpSnappyBundle PDF and Symfony2?
body: <p>I am getting an Authentication Required error on loading CSS and image resources. </p>
  
  <p>Error example:</p>
  
  <pre><code>Warning: Failed to load http://reporter.dev:8888/css/fc84af4_part_1_bootstrap-editable_2.css (ignore)
  </code></pre>
  
  <p>I am using the KNP Snappy bundle as follows: </p>
  
  <pre><code>$html = $this-&gt;renderView(
    'InterlatedReporter:Allocation:casual_calendar_pdf.html.twig',
    array(
      'casualCalendar' =&gt; $casualCalendar,
    )
  );
  
  $filename = "export-casual-calendar-" . date("Ymd") . '.pdf';
  
  return new Response(
    $this-&gt;get('knp_snappy.pdf')-&gt;getOutputFromHtml($html),
    200,
    array(
      'Content-Type' =&gt; 'application/pdf',
      'Content-Disposition' =&gt; 'attachment; filename="' . $filename . '"'
    )
  );
  </code></pre>
  
  <p>The twig template has had absolute paths added to it as follows. The URL's seem to to use file://</p>
  
  <pre><code>{{ app.request.getSchemeAndHttpHost() ~ asset('css/sortable-theme-bootstrap.css') }}
  </code></pre>
  
  <p>I have tried working with security, the dev firewall is in place: </p>
  
  <pre><code>dev:
      pattern:  ^/(_(profiler|wdt)|css|images|js)/
      security: false
  </code></pre>
  
  <p>This is the first rule.</p>
  
  <p>We are using controller annotations as per SensioFrameworkExtraBundle.</p>
  
  <p>I have also tried passing the session as per <a href="https://stackoverflow.com/questions/20286012/symfony-2-kpn-snappy-generate-pdf-with-output-meets-security-area">Symfony 2 kpn snappy generate pdf with output meets security area</a></p>
  
  <p>How to load the resources?</p>