document.save

Hello,

Im using the pdf library in syncfusion and was curious how i can modify the "document.save" to only download the document instead of opening it in a browser, is this possible? Can the parameters be chaged?


document.Save("Protected - "+myFile, HttpContext.Current.Response, HttpReadType.Save);


Regards,

Shane


1 Reply

GK Gowthamraj Kumar Syncfusion Team August 6, 2021 01:03 PM UTC

Hi Shane, 
 
Thank you for contacting Syncfusion support.

 
Yes. We can download the saved PDF document by using HttpReadType.Save argument in ASP.Net application. Please find the code snippet below, 
 
// Download the document in browser after saving it 
document.Save("Output.pdf", HttpContext.Current.Response, HttpReadType.Save); 
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon