Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byte[] asciiBytes = getPdf(...);
- try{
- BinaryWriter bw = new BinaryWriter(File.Create(filename));
- bw.Write(pdfBytes);
- }
- finally {
- if(null != bw)
- bw.Close();
- }
- Response.ContentType = "application/pdf";
- Response.AppendHeader("Content-disposition", "attachment; filename=" + PDID + ".pdf");
- Response.WriteFile(filename);
- Response.Flush();
Add Comment
Please, Sign In to add comment