1:将文档用虚拟打印转换成.tif文件.
2.分割.tif文件,取第一页并生成缩略图,示例代码如下:
代码
using (image = Image.FromFile(tagFilename))
{
Guid guid = (Guid)image.FrameDimensionsList.GetValue(0);
FrameDimension dimension = new FrameDimension(guid);
int pageCount = image.GetFrameCount(dimension);
image.SelectActiveFrame(dimension, 0);
image=image.GetThumbnailImage(100, 100, new Image.GetThumbnailImageAbort(delegate() { return false; }), IntPtr.Zero);
image.Save(tifFirstFrameBuff, ImageFormat.Gif);
image.Dispose();
}