Suppose that sourcedir
is the directory where .tif
the images reside, then you need:
Image image;
Directory.GetFiles(sourceDir, "*.tif");
foreach (string fileName in fileEntries) {
image = Image.GetInstance(filename);
image.ScaleToFit(595, 842);
image.SetAbsolutePosition(0, 0);
document.Add(image);
document.NewPage();
}
In this snippet, I assume that the size of your page is A4 (595, 842). I also add the image in the lower-left corner. You may want to center the image and/or resize the pages.