Response.AddHeader("Content-Disposition", "attachment filename=" + ().ToLower() + ". There’s an option to save the file offline however, if you prefer to automatically download PDFs in Chrome instead of opening them first, you can set it to do just that. If (PluginInstalled=True) //If Chrome plugin is installed then only I have to download file In Chrome, when you click on a link to a PDF file, it loads in the browser and you can read it. PdfFormFields.SetField("Patienthiddenformname", ().Trim()) ĪcroFields docFields = pdfStamper.AcroFields PdfFormFields.SetField("PatientHiddenId", ID.ToString()) PdfStamper pdfStamper = new PdfStamper(pdfReader, Response.OutputStream, '\0', true) ĪcroFields pdfFormFields = pdfStamper.AcroFields Response.ContentType = "application/pdf" Response.ContentType = "application/octet-stream" If (PluginInstalled=True) //If chrome plugin is installed then I download the file else the file displays on browser itself PdfReader pdfReader = new PdfReader(bytedata) > PdfStamper pdfStamper = new PdfStamper(pdfReader, Response.OutputStream, '\0', true) is it possible to feed PDFStamper value in Response again so that I can use Response.WriteFile() ? bytedata = (byte) //This is the Binary data/PDF I saved in Database Hence when I use Response.WriteFile it skips the changes in PDF fields and download the PDF without any change. ![]() I tried this approach earlier but I am using PDFStamper and making dynamic changes in texboxes of PDFs from code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |