table lines are not displaying in pdf after converting from html file using iTextSharp

  • Thread starter Thread starter ginnas
  • Start date Start date
G

ginnas

Guest
hai,

i wanted to convert one html file to pdf format , in that html file contents are there in table ,i am using iTextSharp to convert html to pdf,after conversion only the contents are displayed in the pdf file the table lines are not coming . i am doing it in vs 2010 console application.
i will paste my code here

string content="";
StreamReader sr;
sr= File.OpenText(path);
content=sr.ReadToEnd();
sr.Close();

StringReader sr1 = new StringReader(content);
Document document = new Document(PageSize.A4, 30, 30, 30, 30);

PdfWriter.GetInstance(document, new FileStream(@"c:\temp\result.pdf", FileMode.Create));

HTMLWorker worker = new HTMLWorker(document);

document.Open();

worker.StartDocument();
worker.Parse(sr1);
worker.EndDocument();
worker.Close();
document.Close();

So what we need to do for proper displaying of the table contents with the grid lines in pdf.

please give some solutions

Regards
Ginnas

Continue reading...
 
Back
Top