public HtmlGenericControl GetDiv(int pageNum, string path, PdfDocument document) { PdfTextExtractor textExtractor = new PdfTextExtractor(); HtmlGenericControl div = new HtmlGenericControl("div"); HtmlImage img = new HtmlImage(); HtmlGenericControl textDiv = textExtractor.GetPageText(pageNum, document); img.Src = path; img.ID = "img" + pageNum; div.Controls.Add(img); div.Controls.Add(textDiv); div.ID = "div" + pageNum; div.Attributes["style"] = "position: relative;"; return(div); }