i am creating a pdf document which contains stringbuilder table and image.
 
i set image as document background and set table over the image .now my question is
how to repeat background image on same page .here my code sample
 
iTextSharp.text.Image jpg = iTextSharp.text.Image.GetInstance("C:\\Users\\Archit\\Downloads\\itbp.jpg");
iTextSharp.text.Document pdfDoc = new iTextSharp.text.Document(PageSize.A4, 10F, 10F, 10F, 0F);
jpg.ScaleToFit(615, 175);
jpg.Alignment = iTextSharp.text.Image.UNDERLYING;
jpg.SetAbsolutePosition(10, 658);
StringBuilder sb = new StringBuilder();
sb.Append("");
foreach (DataGridViewRow row in dgv_preview.Rows)
{
bool isSelected = Convert.ToBoolean(row.Cells["checkBoxColumn"].Value);
if (isSelected)
{
DateTime dob = DateTime.Parse(row.Cells["dob"].Value.ToString());
DateTime date = DateTime.Now;
int ab = Convert.ToInt32(row.Cells["ID"].Value);
Zen.Barcode.CodeQrBarcodeDraw brcode = Zen.Barcode.BarcodeDrawFactory.CodeQr;
sb.Append("
" +
"
" +
"
" +
"
");
sb.Append("
");
}
}
sb.Append("
" +
"
" +
"
" +
"
" +
"
" +
"
" +
"
" +
"
Header
ssss
" + row.Cells["REGT NO"].Value.ToString() + "
" + row.Cells["RANK"].Value.ToString() + "
" + row.Cells["NAME"].Value.ToString() + "
" + row.Cells["Aadharno"].Value.ToString() + "
" +
"" +
"
" +
"
" +
"
" +
"
" + row.Cells["CARD NO"].Value.ToString() + "
" + row.Cells["bloodgroup"].Value.ToString() + "
" +
"" +
"
" +
"
" +
"
" +
"
***" + row.Cells["location_h"].Value.ToString() + "" + brcode.Draw("read 200000 faliure " + (ab * 1.5).ToString(), 16) + "
" + row.Cells["idmark"].Value.ToString() + "
" +
"" +
"
" +
"
" + dob.ToString("dd/MM/yyyy") + "" + date.ToString("dd/MM/yyyy") + "
" + row.Cells["eye"].Value.ToString() + "" + row.Cells["height"].Value.ToString() + "
" +
"
" + row.Cells["Location"].Value.ToString() + "
35
");
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);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
iTextSharp.text.pdf.PdfWriter.GetInstance(pdfDoc, output);
pdfDoc.Open();
pdfDoc.Add(jpg);
htmlparser.Parse(sr);
pdfDoc.Close();