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?

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.