https://imgyukle.com/i/rhVeLc https://imgyukle.com/i/rhVWot https://imgyukle.com/i/rhV28Q
hi friends adobe acrobat I know how to fill the form I made with mvc but I need to add a picture I couldn't find how to add it can you help me selam arkadaşlar adobe acrobat yaptığım formu mvc doldura biliyorum lakin resim eklemem gerekiyor nasıl ekleyecegi bulamadım bana yardımcı alabilirmisiniz
<pre>public static class PdfGenerateFromTemplate { public static byte\[\] PdfGenerateTemplate(string pdfJsonData, string pdfPath) { PdfReader pdfReader = new PdfReader(pdfPath); MemoryStream stream = new MemoryStream(); PdfStamper stamper = new PdfStamper(pdfReader,stream); AcroFields pdfFormFields = stamper.AcroFields; var pdfDeserializeJsonData = JsonConvert.DeserializeObject\<Dictionary\<string, string\>\>(pdfJsonData); foreach (var pdfDeserializeJsonDataItem in pdfDeserializeJsonData) { pdfFormFields.SetField(pdfDeserializeJsonDataItem.Key, pdfDeserializeJsonDataItem.Value); } stamper.FormFlattening = true; stamper.Close(); pdfReader.Close(); stream.Flush(); stream.Close(); return stream.ToArray(); } }
<pre>public ActionResult pdfYazdir(int id) { using (Context context = new Context()) { var y = context.pedrigeOlusturmas.Where(m => m.Id == id).FirstOrDefault(); var pegrige = new PedrigeOlusturma(); // pegrige.Gorsel = y.Gorsel; pegrige.Date = y.Date; pegrige.KunyeNo = y.KunyeNo; pegrige.KusAdi = y.KusAdi; pegrige.Dogumtarihi = y.Dogumtarihi; pegrige.Kusrengi = y.Kusrengi; pegrige.Aciklama = y.Aciklama; pegrige.admin = y.admin; pegrige.Baslik = y.Baslik; pegrige.Date = y.Date; pegrige.KunyeNo = y.KunyeNo; var serializeObject = JsonConvert.SerializeObject(pegrige); var pdfPath = y.DosyaYolu; var pdfByte = PdfGenerateFromTemplate.PdfGenerateTemplate(serializeObject, pdfPath ,Kusresmi); System.Web.HttpContext.Current.Response.Clear(); MemoryStream ms = new MemoryStream(pdfByte); System.Web.HttpContext.Current.Response.ContentType = "application /pdf"; System.Web.HttpContext.Current.Response.AddHeader("content-disposition", "atteachment;filename=" + pegrige.KusAdi + ".pdf"); System.Web.HttpContext.Current.Response.Buffer = true; ms.WriteTo(System.Web.HttpContext.Current.Response.OutputStream); System.Web.HttpContext.Current.Response.End(); return RedirectToAction("PreviewCertificate", "Home"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)