# In plaats van PDF te downloaden, hoe forceer je PDF om alleen in de browser te openen/bekijken?

**URL:** https://meta.discourse.org/t/instead-of-downloading-pdf-how-to-force-pdf-to-open-view-in-browser-only/167435
**Category:** Support
**Created:** [17 oktober 2020 om 12:12 UTC](https://meta.discourse.org/t/instead-of-downloading-pdf-how-to-force-pdf-to-open-view-in-browser-only/167435 "2020-10-17T12:12:02Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)
#### Post date: [4 maart 2023 om 08:45 UTC](https://meta.discourse.org/t/instead-of-downloading-pdf-how-to-force-pdf-to-open-view-in-browser-only/167435/4 "2023-03-04T08:45:28Z")

</div>

Inline PDF does not work for me on desktop either.

I’m partially successful displaying PDFs inline when adding them to `FileHelper.inline_images`

> <https://github.com/discourse/discourse/blob/1c9f300896b06d736381f976f49dbfc767a7b958/lib/file_helper.rb#L164-L167>

But then a parameter “inline=1” is needed:

> <https://github.com/discourse/discourse/blob/1c9f300896b06d736381f976f49dbfc767a7b958/app/controllers/uploads_controller.rb#L323-L327>

This could be added in some theme-component ([Inline PDF Previews](https://meta.discourse.org/t/inline-pdf-previews/157649)).

I would like to learn a clean way to switch discourse to serve PDFs with `content-disposition: inline` using a plugin or a [configuration option](https://meta.discourse.org/t/add-configuration-option-to-serve-local-pdf-uploads-inline/257040).

---

_[View the full topic](https://meta.discourse.org/t/instead-of-downloading-pdf-how-to-force-pdf-to-open-view-in-browser-only/167435)._
