如何打印输出 [英] How to take printout

查看:95
本文介绍了如何打印输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个私人角色.
www.mscoder.wordpress.com/2010 /07/18/how-to-type-in​​dian-rupee-symbol-in-text/ [

I create a private character.
www.mscoder.wordpress.com/2010/07/18/how-to-type-indian-rupee-symbol-in-text/[^]

but the problem is i can''t take printout that notepad through dos
''COPY D:\text.txt \\path\printername''
it''s print ? symbol instead of created symbol ...

guide me boss....

推荐答案

在Windows中没有DOS 之类的东西,除非您谈论的是非常古老的系统.您必须在谈论控制台应用程序,尤其是CMD.EXE.这是一个普通的受保护模式的32位或64位Windows应用程序,没有任何愚蠢.
您可以修改控制台字体,请参见
http://www.johndcook.com/blog /2009/07/24/windows-console-fonts/ [ ^ ].

您还需要更改输出编码.对于CMD.EXE,这是选项/U.对于System.Console,请使用属性OutputEncoding,请参见 http://msdn.microsoft.com /en-us/library/system.console.aspx [ ^ ].

请稍等!..与打印无关.文本发送到打印机,而不是控制台.我不会打扰.这种打印方式是过时的,根本没有任何意义.您需要从C#代码打印,而不是通过命令打印.例如,使用类<a href="http://msdn.microsoft.com/en-us/library/system.console.aspx">http://msdn.microsoft.com/en-us/library/system.console.aspx</a>[<a href="http://msdn.microsoft.com/en-us/library/system.console.aspx" target="_blank" title="New Window">^</a>],请参阅MSDN帮助和代码示例: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx [
There is no such thing as DOS in Windows, unless your are talking of very archaic systems. You must be talking about a console application, in particular CMD.EXE. This is a normal protected-mode 32-bit or 64-bit Windows application, no foolishness.

You can modify the console font, see http://www.johndcook.com/blog/2009/07/24/windows-console-fonts/[^].

You also need to change output encoding. For CMD.EXE, this is the option /U. For System.Console, use the property OutputEncoding, see http://msdn.microsoft.com/en-us/library/system.console.aspx[^].


Wait a minute!.. It''s not related to print. The text goes to printer, not to console. I would not bother. This way of printing is archaic and makes no sense at all. You need to print from you C# code, not by command. For example, use the class <a href="http://msdn.microsoft.com/en-us/library/system.console.aspx">http://msdn.microsoft.com/en-us/library/system.console.aspx</a>[<a href="http://msdn.microsoft.com/en-us/library/system.console.aspx" target="_blank" title="New Window">^</a>], see the MSDN help and code sample: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^].

—SA


这篇关于如何打印输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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