//Load image as stamp
PdfImage image = PdfImage.FromFile(@"../../data/test.jpg");
//Reset size of image
float width = image.Width*0.2f;
float height = image.Height*0.2f;//Load pdf document
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(input);
//Get the first page of Pdf document
PdfPageBase page = doc.Pages[0];
//Load image as stamp
PdfImage image = PdfImage.FromFile(@"../../data/test.jpg");
//Reset size of image
float width = image.Width*0.2f;
float height = image.Height*0.2f;
//Create a new PdfRubberStampAnnotation object and specifies the location and size of its annotation
PdfRubberStampAnnotation loStamp = new PdfRubberStampAnnotation(new RectangleF(new PointF(0, 0), new SizeF(width, height)));
//Instantiate a PdfAppearance object and load the image as the stamp
PdfAppearance loApprearance = new PdfAppearance(loStamp);
//Create a new PDF template and draw images in the template
PdfTemplate template = new PdfTemplate(width, height, true);
template.Graphics.DrawImage(image,0,0,width,height);
loApprearance.Normal = template;
loStamp.Appearance = loApprearance;
//Add stamp to Pdf document
page.AnnotationsWidget.Add(loStamp);
//Save the result document
doc.SaveToFile(@"../../output/result2.pdf",FileFormat.PDF);