I need add image for each page on pdf file generated by ItextSharp library.
I have tried this article without success because on pdf file the image is present on only first page in the document.
Can you help me?
Thank you in advance.
My code below.
try
{
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(imagepath);
image.ScalePercent(50f);
pdfDoc.Add(image);
htmlparser.Parse(sr);
}
catch (Exception ex)
{
throw ex;
}
finally
{
pdfDoc.Close();
Response.End();
}