///文件分页保存成图片
csharp
Document doc = new Document("f:\\333.doc");
ImageSaveOptions iso = new ImageSaveOptions(SaveFormat.Jpeg);
iso.Resolution = 128;//这个数据越大越好 清晰度
iso.PrettyFormat = true;
iso.UseAntiAliasing = true;///抗锯齿
for (int i = 0; i < doc.PageCount; i++)
{
iso.PageIndex = i;
doc.Save("D:/test/test" + i + ".jpg", iso);
}
//文件处理完成后,保存字节流保存图片
csharp
doc = new Document(GModel.PrintBiaoqianPath);
doc = new OPWord().ObjectToBookmark<PrintBiaoqian>(doc, ThisModel);
//string TempFilepath = GModel.FileTempExport + ReportOut.LeixingName + Guid.NewGuid().ToString().Substring(0, 3) + ".Temp";
MemoryStream WordStream = new MemoryStream();
WordStream.Seek(0, SeekOrigin.Begin);
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Png);
options.MemoryOptimization = true;
options.Resolution = 250;
options.PrettyFormat = true;
options.UseAntiAliasing = true;
doc.Save(WordStream, options);
Image ThisImage = new Bitmap(WordStream);
if (ThisImage!=null )
{
PBShow.Image = ThisImage;
}