So you can force a download by using Content-Disposition: attachment
Content-Disposition: attachment
Content-Disposition: inline is the default and should display in the brows
Content-Disposition: inline
You need to provide both these meta data inorder to view the file instead of download:
Content-Disposition: attachment Content-Type: application/pdf