Archit Shrivastava

Archit Shrivastava

  • 1.7k
  • 414
  • 76.1k

background image not show in pdf

Sep 7 2018 1:33 AM
i am creating string builder table and set background image of table now when i print the table to pdf background image not display in pdf why??/
 
 here i set image:-
sb.Append("");
 
 
and here print the 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();
//Location = Location +400;
 

Answers (2)