Developer forum

Forum » CMS - Standard features » Open .PDF in browser instead of download

Open .PDF in browser instead of download

Christian Abrahamsson
Reply

Hello,

I'm trying fo open pdf documents directly in the browser but they automaticly get the DWSDownload.aspx.

I've seen examples that you should be able to add &download=false to the query to prevent this behaviour but I did not get it to work.

Is there a new way to prevent download without moving the documents to image folder or should above still work?

Using DW 9.

 

Best regards,

Christian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Christian

Sorry about the late answer.

You cannot completely control that as it is ultimately the browser settings that make that decision.

But you can add ?ForceDownload=False to the DWSDownload.aspox call which will redirect to Download.aspx with this parameter.

Also not that this feature is deprecated in later implementation models - so if you do not use the template tag based layout templates using the @DwContent() placehoider logic, DWSDownloas.aspx will not be injected. But that requires a re-implementation. 

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum