关于WPF打印的问题

116 篇文章 9 订阅

我曾在此文中提到过WPF中的文档打印:
http://blog.csdn.net/johnsuna/archive/2007/09/07/1775969.aspx 

有朋友来信问了这样一个问题:
发现 在WPF上做打印功能,只能限制在XPS上面,如果是个XPS格式的文档,那还行,有些文件原先不是XPS 格式的,比喻.doc, .pdf等等,难道要去手动把它们变成XPS 格式的吗? 那要程序干什么! 这几天一直在研究,搞不定,网上关于WPF的资料又少,请教大侠有什么好的思路,给小弟参考参考….
 
》》
You can see these urls:
http://www.charlespetzold.com/blog/2006/02/201111.html
http://www.charlespetzold.com/blog/2006/02/230940.html

http://msdn2.microsoft.com/en-us/library/ms742418.aspx
And the Printing Overview section in the SDK. Printing in WPF is definitely the easiest it's ever been on any Microsoft platform. PrintPageEventArgs and the rest of the System.Drawing.Printing API is a thing of the past. For the quick start, just have a look at PrintDialog. The easiest thing to do is just hand it your on screen UI element that you want printed, via PrintVisual, and let it do the rest.
 
http://msdn2.microsoft.com/en-us/library/aa969772.aspx
http://msdn2.microsoft.com/en-us/library/ms771525.aspx

If you want print other files which like .doc, .pdf, you can use another software such as Word, Acrobt and so on. If you want print in you programe, you can call windows print APIs or 3rd Plug-In.

100% .NET component for rendering PDF documents: http://www.codeproject.com/showcase/pdfrasterizer.asp?print=true

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值