//Create PdfImage object from image stream
PdfImage image = PdfImage.FromStream(imageStream);
//Create PdfLayoutFormat object
PdfLayoutFormat format = new PdfLayoutFormat();
format.Layout = PdfLayoutType.Paginate;
format.Break = PdfLayoutBreakType.FitElement;
PdfLayoutResult result = null;
//Draw the image using PdfLayoutFromat
result= image.Draw(page, new PointF(10, 10), format);
for (int i = 0; i < 10; i++)
{
//continuously draw the Image.
result= image.Draw(result.Page, new PointF(result.Bounds.X,result.Bounds.Bottom+10), format);
}
|