2

I have used a YouTube video to learn how to implement a button on my .net c# that converts text to PDF. This works totally fine but it saves to a pre-defined location specified in one of the lines in the code.

PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("J:/Module Results.pdf", FileMode.Create));

This saves the PDF to the J drive but instead I would like it to give the user a Save as option as happens when downloading anything else from any website.

Does anyone know how this can be done? Or if this can be done?

Simon Adcock
  • 3,554
  • 3
  • 25
  • 41

1 Answers1

0

The end user can't directly create and save the pdf file. What you need is to create a file and save it to server side.
And then provide the path of the file in a link to download that file.

शेखर
  • 17,412
  • 13
  • 61
  • 117