在 Windows 上打印源代码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1312172/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Printing source code on Windows
提问by Greg
What is the best Windows program to print out source code (more generally, text files)? I'd like the following features:
打印源代码(更一般地,文本文件)的最佳 Windows 程序是什么?我想要以下功能:
- Includes line numbers
- Option of printing 2 or 4 pages on a single sheet of paper.
- Header includes filename and timestamp.
- 包括行号
- 可选择在一张纸上打印 2 页或 4 页。
- 标头包括文件名和时间戳。
采纳答案by Breakthrough
回答by Bram
I tried the suggested Notepad++ and Codex, but I find them too limiting. I could not print two columns per sheet in either one of them. I like to maximize the amount of code per sheet. A decade ago I would use pcps to print multiple columns of source code, but that software is just too old and cumbersome in this day and age. For now, I would suggest this, if you want multi column output: http://www.lerup.com/printfile/
我尝试了建议的 Notepad++ 和 Codex,但我发现它们太局限了。我无法在其中任何一个中每张纸打印两列。我喜欢最大化每张纸的代码量。十年前,我会使用 pcps 打印多列源代码,但该软件在当今时代太陈旧和笨重了。现在,如果您想要多列输出,我建议这样做:http: //www.lerup.com/printfile/
回答by RiddlerDev
UltraEdit works pretty well for all three of those.
UltraEdit 对所有这三个都非常有效。
回答by cori
I use Contextfor most of my non-Visual Studio development, and it does what you asked for and is free. I don't know how well it does color, but the source code colors print in a couple of varying boldnesses, which makes it pretty readable in black and white.
我在大多数非 Visual Studio 开发中使用Context,它可以满足您的要求并且是免费的。我不知道它的颜色表现如何,但是源代码颜色以几种不同的粗体打印,这使得它在黑白中非常易读。
I just use the printer dialog to set the multi-pages per sheet option.
我只是使用打印机对话框来设置每张纸多页选项。
回答by dengel
I'm using Codex: http://www.snapfiles.com/get/codex.html
我正在使用 Codex:http: //www.snapfiles.com/get/codex.html
Works pretty good, can both print and publish (export to HTML).
效果很好,可以打印和发布(导出为 HTML)。
回答by dengel
Crimson Editorlooks great too!
Crimson 编辑器看起来也很棒!