0

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();
Nic
  • 12,220
  • 20
  • 77
  • 105
  • 1
    No, you can't specify a folder to save the file. It is either controlled by the user or the browser – Thangadurai Dec 29 '14 at 09:08
  • you should go with silverlight or asp.net applet for achieving this task. – prog1011 Dec 29 '14 at 09:23
  • http://stackoverflow.com/questions/10437872/download-file-to-a-specific-location-with-response-binarywrite-and-server-mappat – Gopinath Koothaperumal Dec 29 '14 at 09:23
  • Now i have done in save file to specific path.Are you know if i want to open file and sent it to print, How to do that , i need to get another component to solve this function ? @Thangadurai; @Gopinath Koothaperumal; – thanapat saeliu Dec 30 '14 at 01:57

0 Answers0