TiffBitmapDecoder decoder = new TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default); using (MemoryStream allFra
Try executing allFrameStream.Position = 0; just before writing to the PDF.
allFrameStream.Position = 0;