IntPtr iHandle = CreateFile(LPT1, 0x40000000, 0, 0, OPEN_EXISTING, 0, 0);
FileStream fs = new FileStream(iHandle, FileAccess.ReadWrite);
StreamWriter sw = new StreamWriter(fs, System.Text.Encoding.Default);
sw.WriteLine("请教大家");
sw.WriteLine("谢谢");
sw.Close();
fs.Close();
这里打印出来的时候我想把"谢谢"的字体加大 有什么办法么?在网上游了好久都没看到相关资料...求各位大虾帮帮忙 一定给分!
FileStream fs = new FileStream(iHandle, FileAccess.ReadWrite);
StreamWriter sw = new StreamWriter(fs, System.Text.Encoding.Default);
sw.WriteLine("请教大家");
sw.WriteLine("谢谢");
sw.Close();
fs.Close();
这里打印出来的时候我想把"谢谢"的字体加大 有什么办法么?在网上游了好久都没看到相关资料...求各位大虾帮帮忙 一定给分!
你不如写入html的文件吧,然后用浏览器打开,再打印
比如写入下面的文本<html>
<head>
<style type="text/css">
h1 {font-size: 300%}
h2 {font-size: 200%}
p {font-size: 100%}
</style>
</head><body>
<h1>This is header 1</h1>
<h2>This is header 2</h2>
<p>This is a paragraph</p>
</body></html>
字体只是对字符的修饰而已
就像楼上所说的 那个是用HTML修饰
在word里面又不同
在别的地方也不同
这是POS打印机,一点按钮就出票的程序。已经实现功能,但是就是要特定地方的字体要大。
那就是不能用这个方法打印了...如果按2楼的方法是不是得手动打开html呢
方法可以做到