1

On my Symfony2 website, in my controller, I have the following script that renders a pdf:

return new Response(
        $this->get('knp_snappy.pdf')->getOutputFromHtml($html),
        200,
        array(
            'Content-Type'          => 'application/pdf',
            'Content-Disposition'   => 'inline; filename="file.pdf"'
        )
    );

In my frontend the pdf is displayed in an iframe inside a popup.

On my PC and laptop showing the pdf in the iframe works totally fine. However, when I browse the site in Chrome on Android (!) and open the popup, the file gets downloaded instead of shown.

How can I achieve that the file gets only displayed but not downloaded on Android?

Max
  • 832
  • 1
  • 14
  • 33
  • Possible duplicate of [How to display a PDF via Android web browser without "downloading" first](http://stackoverflow.com/questions/7437602/how-to-display-a-pdf-via-android-web-browser-without-downloading-first) – Carlos Granados Oct 29 '15 at 11:04

0 Answers0