编辑:这是我用谷歌搜索的快速指南 - < a href="http://dsl.org/cookbook/cookbook_17.html" rel="nofollow noreferrer">http://dsl.org/cookbook/cookbook_17.html
its going to depend on your printing font, you want to aim for a fixed width font so that it is consistent, 80 columns is generally safe.... i think....
This way you can pipe the plane-text format into a converter that will result in postscript, PDF or HTML, that you can then print. This also mostly negates the need to consider the line width for the sake of your printer. The converter will do this for you.
It definitely depends on the font you use when printing, and unless you have control over that you can't guarantee it will print nicely. For example, in Word 2007, creating a blank document and setting the font to Courier New 10pt only fits 77 characters per line and 28 lines per page. Changing the margins and line spacing will modify that. However if you used that and they tried to print from Wordpad it wouldn't work because the default with Courier New 10pt only fits 72 characters per line. In either case, the standard 80 characters doesn't work. Those defaults aren't even global defaults.
The best you can probably do is pick a size and provide instructions on printing the report with several common editors so it will look acceptable. Specify the font, margin, line spacing, etc.
Have you considered other options, like creating two files? One could be plain text for import into the other program. The other could be a format better suited for printing.
发布评论
评论(4)
它取决于你的打印字体,你想要的目标是固定宽度的字体,以便它是一致的,80列通常是安全的....我认为....
编辑:这是我用谷歌搜索的快速指南 - < a href="http://dsl.org/cookbook/cookbook_17.html" rel="nofollow noreferrer">http://dsl.org/cookbook/cookbook_17.html
its going to depend on your printing font, you want to aim for a fixed width font so that it is consistent, 80 columns is generally safe.... i think....
edit: here is a quick guide I googled - http://dsl.org/cookbook/cookbook_17.html
如果您可以控制输出格式,请考虑使用轻量级所见即所得标记语言,例如reStructuredText、AsciiDoc、markdown 等。通过
这种方式,您可以将平面文本格式传输到转换器中,该转换器将生成 Postscript、PDF 或 HTML,然后您可以打印。这也基本上不需要考虑打印机的线宽。转换器将为您完成此操作。
If you have control over the output format, consider a lightweight WYSIWYG markup language, Such as reStructuredText, AsciiDoc, markdown etc.
This way you can pipe the plane-text format into a converter that will result in postscript, PDF or HTML, that you can then print. This also mostly negates the need to consider the line width for the sake of your printer. The converter will do this for you.
让用户有机会设置最大线宽怎么样?
How about giving the user the chance to set the maximum line width.
这绝对取决于您在打印时使用的字体,除非您能够控制它,否则不能保证它会很好地打印。例如,在 Word 2007 中,创建空白文档并将字体设置为 Courier New 10pt 仅适合每行 77 个字符和每页 28 行。更改边距和行间距将会改变这一点。但是,如果您使用它并且他们尝试从写字板打印,它将无法工作,因为 Courier New 10pt 的默认设置每行只能容纳 72 个字符。无论哪种情况,标准的 80 个字符都不起作用。这些默认值甚至不是全局默认值。
您能做的最好的事情就是选择一个尺寸并提供使用几个常用编辑器打印报告的说明,这样它看起来就可以接受。指定字体、边距、行间距等。
您是否考虑过其他选项,例如创建两个文件?一个可以是纯文本,可以导入到另一个程序中。另一种可能是更适合打印的格式。
It definitely depends on the font you use when printing, and unless you have control over that you can't guarantee it will print nicely. For example, in Word 2007, creating a blank document and setting the font to Courier New 10pt only fits 77 characters per line and 28 lines per page. Changing the margins and line spacing will modify that. However if you used that and they tried to print from Wordpad it wouldn't work because the default with Courier New 10pt only fits 72 characters per line. In either case, the standard 80 characters doesn't work. Those defaults aren't even global defaults.
The best you can probably do is pick a size and provide instructions on printing the report with several common editors so it will look acceptable. Specify the font, margin, line spacing, etc.
Have you considered other options, like creating two files? One could be plain text for import into the other program. The other could be a format better suited for printing.