Hi,
I am using itextsharp. I want to add a border in image. I am sharing the codes.
I would be glad if you could help.
Code
PdfPCell val21 = new PdfPCell(new Phrase(""));
val21.BorderColor = (BaseColor.RED);
val21.Border=(5);
val21.Colspan=(3);
val21.PaddingTop=(60f);
val21.PaddingLeft=(25f);
PdfPCell pdfPCell3 = val21;
pdfPCell3.AddElement((IElement)new Phrase(Environment.NewLine));
string attribute = ((BaseEntity)(object)shipment).GetAttribute<string>("ReturnBarcodePng");
if (!string.IsNullOrEmpty(attribute))
{
using (MemoryStream stream = new MemoryStream(Convert.FromBase64String(attribute)))
{
System.Drawing.Image image = System.Drawing.Image.FromStream(stream);
image.RotateFlip(System.Drawing.RotateFlipType.Rotate90FlipNone);
Image ınstance = Image.GetInstance(image, System.Drawing.Imaging.ImageFormat.Png);
ınstance.SetDpi(200, 200);
ınstance.SetAbsolutePosition(0f, 0f);
ınstance.ScaleToFit(450f, 420f);
pdfPCell3.AddElement((IElement)(object)ınstance);
pdfPTable3.AddCell(pdfPCell3);
}
}