0

I am filling out a pdf and using response.binarywrite. I put it in the page - the problem is when I put it in the page it gets rid of the menu and other images existing in that page; and replaces them with a pdf. How do I keep the menu in the page and add the pdf?

pdfStamper.FormFlattening = false;

pdfStamper.Close();
pdfReader.Close();

Response.AddHeader("Content-Disposition", "inline; filename=Appraisal.pdf");
Response.ContentType = "application/pdf";

Response.BinaryWrite(output.ToArray());
Response.Flush();
Response.End();
Ondrej Janacek
  • 12,486
  • 14
  • 59
  • 93
  • You can't. You can consider displaying the PDF in an iframe. – CodeCaster Feb 07 '14 at 17:16
  • @CodeCaster sure you can. You can use the object tag http://stackoverflow.com/questions/2740297/display-adobe-pdf-inside-a-div but the OP will probably have to write the binary data to a file – Conrad Frix Feb 07 '14 at 17:18
  • @Conrad I forgot about object embedding, thanks. – CodeCaster Feb 07 '14 at 17:19
  • thannks for comments,cif i write a binary data to a file then the file is created, since each user can create this file that means there will be big number of these files on the server , or there is one that keeps getting replaced is that right? assuming i am using File.WriteAllBytes – user3284844 Feb 07 '14 at 18:13
  • i guess what i am trying to say is this pdf form is different for each user – user3284844 Feb 07 '14 at 18:21

0 Answers0