TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Archit Shrivastava
NA
416
118.6k
how to add dynamic image to table cell
Sep 3 2018 2:47 AM
i want to add dynamic Images to html table ,here code sample
StringBuilder sb = new StringBuilder();
sb.Append("<table border=1 width = 400>");
sb.Append("<tr><td width=7% height = 50% width=70% rowspan =4>ID</td><td >Name</td></tr>");
sb.Append("<tr><td>1</td><td>"+(name)+"</td></tr>");
sb.Append("<tr><td>2</td><td>" + (rank) + " </td></tr>");
sb.Append("<tr><td>3</td><td>" + (rank) + " </td></tr>");
sb.Append("</table>");
StringReader sr = new StringReader(sb.ToString());
string path = "C:\\Users\\Archit\\Desktop\\test.pdf";
StringWriter sw = new StringWriter();
var output = new FileStream(path, FileMode.Create);
iTextSharp.text.Document pdfDoc = new iTextSharp.text.Document(PageSize.A4, 10F, 10F, 10F, 0F);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
iTextSharp.text.pdf.PdfWriter.GetInstance(pdfDoc, output);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
here i set name etc.but i want to set image too.
Reply
Answers (
0
)
how to add another pdf table inside the first table cell
background image in stringbuilder table