I generate a pdf file on the fly and save it to the server side but i need to save it to the client machine. How to achieve this..

```
 Document doc = new Document();
 MemoryStream memoryStream = new MemoryStream();
 string PDFName = ProjectName + ".pdf";
 PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(Server.MapPath("~/ProjectFiles") + "/" + 
 PDFName, FileMode.Create));
 doc.Open();
       //PDF Content
 doc.Close();

 Response.ContentType = "application/pdf";
 Response.AddHeader("content-disposition", "attachment;filename=" + PDFName);
 Response.Buffer = true;
 Response.Clear();
 Response.OutputStream.Write(memoryStream.GetBuffer(), 0, memoryStream.GetBuffer().Length);
 Response.OutputStream.Flush();
 Response.End();

     In Response.OutputStream.Write(memoryStream.GetBuffer(), 0, memoryStream.GetBuffer().Length); 

```

The memoryStream length is 0. I need to download the saved pdf into Cleint machine.
Please help me to fix this issue..