I have a href link to a pdf file that when clicked on it downloads. I want this to just open in a new page instead of downloading.
<a href="../file/1012">clicking here</a>
I've had a look at a website that does this with iframe, but I would prefer not to use that.
At the top right, click More Settings. At the bottom, click Show advanced settings. Under “Privacy”, click Content settings. Under “PDF Documents," check the box next to "Open PDF files in the default PDF viewer application.” (Uncheck this box if you want PDFs to open automatically when you click them.)
Sometimes even when setting Adobe Acrobat DC as the Default, downloaded PDFs will open in Chrome instead. This is because Chrome is set to use it's integrated PDF viewer when files are downloaded by default. You will need to turn this off to make it go away.
Your server should return this http header:
Content-Type: application/pdf
For viewing in browser it should also return:
Content-Disposition: inline;filename="myfile.pdf"
For downloading:
Content-Disposition: attachment;filename="myfile.pdf"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With