将Word文档的第一页另存为C#中的图片 [英] Save the first page of a word document as picture in C#

查看:104
本文介绍了将Word文档的第一页另存为C#中的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我试图获取Word文档的第一页并将其另存为使用C#在asp.net项目中的jpg图像.有人知道怎么做吗?请帮助我


谢谢,
Satya

Hi,


i am trying to get the first page of a word document and save it as jpg image in an asp.net project using C#. does anybody know how to do it? please help me


Thanks,
Satya

推荐答案



一种方法是使用可以打印到jpeg的打印机驱动程序.然后(通过Interop)使用该驱动程序打印第一页.一个示例是: http://sourceforge.net/projects/imageprinter/ [
Hi,

One way to do this is to use a printer driver that can print to jpeg. Then (via Interop) print the first page using such driver. One example is :http://sourceforge.net/projects/imageprinter/[^]

[Addition/Clarification]
- Download the driver from sourceforge (it''s a setup for the driver)
- install it
- now write the proper code in C# where you (using interop)
- open the word document
- print the first page to using the printer driver installed
- close the document


这篇关于将Word文档的第一页另存为C#中的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆