天佑湖南卫视跨年,东施效颦,快鸟卫星
用aspose组件的优点是操作word文档不需要安装office就可以实现。
首先需要引用aspose.words.dll,链接地址:链接:https://pan.baidu.com/s/1rjvjp-kmseteryf_oud28q 提取码:awiw
代码如下:
public bool wordtotif(string sourcepath,string targetpath) { try { document doc = new document(sourcepath); imagesaveoptions iso = new imagesaveoptions(saveformat.tiff); iso.tiffcompression = tiffcompression.ccitt4; //设置压缩方式 iso.pagecount = 1; iso.resolution = 200; //设置精度 //iso.prettyformat = true; //iso.useantialiasing = true; int count = doc.pagecount; for (int i = 0; i < count; i++) { iso.pageindex = i; doc.save(targetpath + "\\000" + i.tostring() + ".tif", iso); } } catch(exception e) { console.writeline(e.message); console.readkey(); } return true; }
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论