How to specify the path file to receive the file

206 Views Asked by At

I'm working with pechkin.dll to convert a webpage to a PDF file. I try to use "TransmitFile" set path, but it's not working.

This is my code and now that file is still store at C:\User\Username\download.

How do I specify the file in my project("~/convertFile")?

Response.Clear();
Response.ClearContent();
Response.ClearHeaders();

Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition", string.Format("attachment;filename=test.pdf; size={0}", pdf.Length));

Response.BinaryWrite(pdf);
Response.Flush();
Response.End();
0

There are 0 best solutions below