设置的WinForms RichTextBox的一个PrintDocument的来源 [英] Set WinForms RichTextBox as the source of a PrintDocument
问题描述
我要打印的 RichTextBox的<内容/一>,所以我试图做一个的PrintDocument 一出在RichTextBox的。但我不找到一种方法,一个简单的RichTextBox转换为PrintDocument的。任何想法?
I want to print the contents of a RichTextBox, so I am trying make a PrintDocument out of the RichTextBox. But I dont find a way to convert a simple RichTextBox to a PrintDocument. Any ideas?
推荐答案
有MSDN上有关此相当广泛的文章,的获得所见即所得的打印结果从.NET RichTextBox的:如果这是TLDR然后有一个浓缩版的知识库文章,的如何使用Visual C#.NET或Visual C#打印RichTextBox控件的内容2005
There's quite an extensive article on this on MSDN, Getting WYSIWYG Print Results from a .NET RichTextBox: if that's TLDR then there's a condensed version as a kb article, How to print the content of a RichTextBox control by using Visual C# .NET or Visual C# 2005
这篇关于设置的WinForms RichTextBox的一个PrintDocument的来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!