c# - Adding an image next to a table in iTextSharp -
I want to add an image next to a table without a new line. I have the following code:
iTextSharp.text.Font font = new iTextSharp.text.Font (FontFactory.GetFont ( "Ariel", 8, iTextSharp.text.Font.NORMAL)); ITextSharp.text.font fontbold = new iTextSharp.text.Font (FontFactory.GetFont ( "Ariel", 8, iTextSharp.text.Font.BOLD)); PdfPTable tkunde = new PDFPTable (1); Triples With percentage = 30; Tkunde.HorizontalAlignment = Element ALIGN_LEFT; PDFPLL LANCUNNVAN = new PDFPCL (new phrase (renewal, font-ball)); LabkunNavn.PaddingTop = 2f; LabkunNavn.HorizontalAlignment = Element.ALIGN_LEFT; LabkunNavn.Border = 0; Tkunde.AddCell (labkunNavn); PDFPCLL LANCONEresressS = new PDFPCL (new phrase (address, font)); LabkunAdresse.PaddingTop = 2f; LabkunAdresse.HorizontalAlignment = Element.ALIGN_LEFT; LabkunAdresse.Border = 0; Tkunde.AddCell (labkunAdresse); PdfPCell labkunPost = new Peedifpisiel (new phrase (Posten + "+ Oman, font)); LabkunPost.PaddingTop = 2f; LabkunPost.HorizontalAlignment = Element.ALIGN_LEFT; LabkunPost.Border = 0; tkunde.AddCell (labkunPost); doc.Add (tkunde); ITextSharp.text.Image png = iTextSharp.text.Image.GetInstance (@ "C: \ users \ Osman \ Desktop \ Daunlodkjepijiji"); Png.WidthPercentage = 10; png.ScalePercent (50F); Png .Alignment = Element.ALIGN_RIGHT; doc.Add (PNG);
but it adds to the image of the bottom of the table shown in the picture on the link below:
< P>I think the layout should be like this instead:
How do I get it?
Thanks in advance
Comments
Post a Comment