请教一下,我现在想实现一个将office文件转换成图片的功能,能不能用代码实现。分数不够可在加! 在线急等
解决方案 »
- GdipCreateEffect、GdipBitmapApplyEffect等GDI+1.1的API函数是不是还没有封装进VS2010中啊?
- 导出EXCEL格式
- 关于播放带滚动条的flash如何动态换xml中电影路径问题《急!!!!!!!!!》
- 100分请教一些最基本的问题,需要您的一点耐心:)
- 关于switch语句的一个小问题,谢谢了!
- c#调用borland c++ 6.0 组件
- 写数据时,如何判断客户已断开
- C#开发的开源 OA办公系统 coffice UDS 飞思 的问题
- C# 获取打印机状态
- 求救,在C#中有没有办法把DataGrid中的内容打印出来
- 请问一下C#获得本地时间和服务器端的时间应该怎么获得?
- dgv控件怎么能新加一行空白的时候自动加上时间
2、在服务器上装office,和虚拟打印机。设置office中的默认打印机为此虚拟打印机。
3、在c#里调word打开doc文档,打印。
4、访问打出来的图片。具体细节自己百度吧,我的刻盘放家了。
bullizip
免费的
office2003下我用的。
相关的虚拟打印机是支持直接com调用的,其官网提供了在线的用户手册,你要是想再了解一下,自己上网一下吧。支持打印成pdf,也支持水印的。非常方便的一个小软件。关于它的免费协议由于我是在内部小系统用,没商用,所以没仔细看,你要发布的话请自己查清楚。 Microsoft.Office.Interop.Word.Application theWordApp = null;
Microsoft.Office.Interop.Word.Document theDoc = null; object falseValue = false;
object trueValue = true;
object nothingStr = "";
object missing = System.Reflection.Missing.Value;
object fileName = @"C:\a.doc ";
object Background = true;
object Range = Microsoft.Office.Interop.Word.WdPrintOutRange.wdPrintAllDocument;
object Copies = 1;
object PageType = Microsoft.Office.Interop.Word.WdPrintOutPages.wdPrintAllPages;
object PrintToFile = false;
object Collate = false;
object ActivePrinterMacGX = missing;
object ManualDuplexPrint = false;
object PrintZoomColumn = 1;
object PrintZoomRow = 1;
string PrintfileName = @"C:\aaaaaaa_<pageno>.jpg "; theWordApp = new Microsoft.Office.Interop.Word.Application();
theWordApp.Visible = false;
theDoc = theWordApp.Documents.Open(ref fileName, ref missing, ref falseValue, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
theDoc.Activate();
Bullzip.PDFPrinterSettings theSetting = new Bullzip.PDFPrinterSettings(); theSetting.SetValue("Output", PrintfileName);
theSetting.SetValue("Device", "jpeg");
theSetting.SetValue("ShowSettings", "never"); theSetting.WriteSettings(true);
theWordApp.PrintOut(ref Background, ref falseValue, ref Range, ref missing,
ref missing, ref missing, ref missing, ref Copies,
ref missing, ref PageType, ref PrintToFile, ref Collate, ref missing,
ref ActivePrinterMacGX, ref ManualDuplexPrint, ref PrintZoomColumn,
ref PrintZoomRow, ref missing, ref missing);
Console.ReadLine();
theWordApp.Application.Quit(ref falseValue, ref missing, ref missing);
theDoc = null;
theWordApp = null;
Console.ReadLine();