Created Syncfusion not displaying but downloading in the browser

Hi, 
I have an issue related to pdf display on my browser using iframe. The problem is when I create a pdf using syncfusion and upload it into my blob I store the file URL in my database for further processing.
but when I use the same URL to display in my browser doesn't display the pdf but directly download it. after a lot of time, I realize the content header of pdf is being set to attachment which forces the file to download by the browser.
is there any way I can set it to inline so that it can be rendered by browser?


1 Reply 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team March 2, 2021 01:56 PM UTC

Hi Awaneesh, 

Thank you for contacting Syncfusion support. 

We can open a generated PDF in a new browser tab without saving locally in the disk. Please refer the below links for more information, 

  
Note: Kindly please try to change the Content-Disposition  as inline for opening the file within the browser window. 
header("Content-disposition: inline; filename=".basename(path)); 

If it is not suites your requirement, kindly please more detail such as runnable sample application with replicated steps, complete code snippet, to check the issue on our end. So, that it will be helpful for us to analyze and assist you further on this.  
  
Regards, 
Gowthamraj K 


Marked as answer
Loader.
Up arrow icon