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?