简体   繁体   English

是否有参数可以通过 Shell 命令更改用于打印记事本的字体大小?

[英]Is there an argument to change font size for printing Notepad trough Shell Command?

I have a script in Proficy - Cimplicity (Basic Script Engine) that build up a temporary text file then print it and then delete it afterward.我在 Proficy - Cimplicity(基本脚本引擎)中有一个脚本,它建立一个临时文本文件,然后打印它,然后删除它。 It always worked fine, but since this script is now on an Windows 10 environment, the font is too big.它总是工作正常,但由于此脚本现在在 Windows 10 环境中,因此字体太大。 Therefore, I need to change the font size of the print.因此,我需要更改打印的字体大小。

I print the text file with a shell command through notepad.我通过记事本用 shell 命令打印文本文件。

I tried to find any argument to change this, but I found nothing.我试图找到任何论据来改变这一点,但我什么也没找到。

I tried changing the default size font in the Notepad application but it does not seem to affect the printing I do with the script.我尝试更改记事本应用程序中的默认大小字体,但它似乎不会影响我使用脚本进行的打印。

PrinterName = """" & item$(strconfig(0),2) & """"
PrinterFile =  """C:\CIMPLICITY\HMI\projects\Error_Files\PointPrinter.Log""" 
ID=Shell("notepad /pt " & PrinterFile & " " & PrinterName)

I do not know the actual size of the font that prints, but I guess it's around 11. Anything smaller would be great, the goal is for it to fit in one page as it used to be in Windows XP.我不知道打印字体的实际大小,但我猜它大约是 11。任何较小的都会很棒,目标是让它像以前在 Windows XP 中一样适合一页。

Changing the default font size of Notepad in its registry does work on other computer.在其注册表中更改记事本的默认字体大小在其他计算机上也有效。 It would appear that the first computer i was trying it on had some setting that came in conflict with the default font setting of notepad.看起来我尝试使用的第一台计算机的某些设置与记事本的默认字体设置冲突。

Also, there is no way to pass argument of any font setting trough a .txt file.此外,无法通过 .txt 文件传递​​任何字体设置的参数。 Need to go with .rtf or .pdf or .html需要使用 .rtf 或 .pdf 或 .html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM