for example most of my product is with <textarea> filed to add note for the order i want a bar-code that if i scan the printed PDF ill get the note as well
yes, use this code for bar-code Generate - -first we install Barcodelib nuget package (https://github.com/barnhill/barcodelib)in Nop.Web and then write this code in PrintOrderDetails method of OrderController ,
using (MemoryStream memoryStream = new MemoryStream()) { Barcode b = new Barcode(); Image img = b.Encode(TYPE.CODE39, "123456789101" , Color.Black, Color.White, 310, 90); { img.Save(memoryStream, ImageFormat.Jpeg); ViewBag.CODE39 = "data:image/png;base64," + Convert.ToBase64String(memoryStream.ToArray()); } }
and then pass viewbag in order details.cshtml view lick that <img src="@ViewBag.CODE39" />
this barcode generate on your orderdetails page.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hâlen sorularınız mı var veya yardıma mı ihtiyacınız var?