I need to add Image and address on the top of the table.I tried in the following 2 ways,it didnt worked out...
I Way:
PdfWriter.GetInstance(pdfDoc, new FileStream(Context.Server.MapPath("~/PdfDoc/ProJKRMMembershipPaymentDetails.pdf"), FileMode.Create));
pdfDoc.Open();
htmlparser.Parse(sr);
//Before writing this line,we have to make sure we added the using iTextSharp.text NameSpace
iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance(Server.MapPath("~/Admin/images/logo.png"));
pdfDoc.Add(png);
pdfDoc.Add(new Paragraph("Pertubuhan Professional JKR"));
pdfDoc.Add(new Paragraph("Malaysia"));
pdfDoc.Add(new Paragraph("Tingkat 4,Blok F,Ibu Pejabat"));
pdfDoc.Add(new Paragraph("JKR Malaysia Jalan Sultan"));
pdfDoc.Add(new Paragraph("Salahuddin 50582 KualaLumpur"));
pdfDoc.Close();
II Way:
<asp:Panel ID="pnlPerson" runat="server">
<table border="1" style="font-family: Arial; font-size: 10pt; width: 200px">
<%-- <tr>
<td> <asp:Image ID="imgLogo" runat="server" ImageUrl="~/images/logo.png"/> </td>
<td>Pertubuhan Professional JKR<br />
Malaysia<br />
Tingkat 4,Blok F,Ibu Pejabat<br />
JKR Malaysia Jalan Sultan<br />
Salahuddin 50582 KualaLumpur</td>
</tr>--%>
<tr>
<td colspan="2" style="background-color: #18B5F0; height: 18px; color: White; border: 1px solid white">
<b>
Payment Confirmation for ProJKRM Membership</b>
</td>
</tr>
<tr>
<td><b>Name:</b></td>
<td><asp:Label ID="lblName" runat="server"></asp:Label></td>
</tr>
and so on..until closing the table..
Please reply me as soon as possible.