Change handling of PDF links

Currently all pdf links on the website download the file - how can I change this to open in the browser instead (by default)?

I realise some browsers allow the user to change how file links are handled, but I just want the default setting to be open the PDF, not download it.

Thanks

Where are these links coming from? Are they part of a custom template, or for files in the WYSIWYG editor?

In general this is something that is controlled at a browser-level.
There are headers you can add to tell the browser you’d prefer for them to be opened inline - you could add those headers via a middleware layer, or (depending on how the links are produced) you could do this on a controller which handles PDF links.