PDF是一种广泛使用的格式化打印文档的标准。
PDF is a widely used standard for formatting print-ready documents.
使用jdk格式化日期以实现打印是完全可以的,但是我始终认为它应该更简单一些。
Using the JDK to format dates for printing is robust, but I've always thought it should be simpler.
FOP是由xsl格式化对象(XSL - FO)推动的世界上第一个打印格式化程序。
FOP is the world's first print formatter driven by XSL Formatting Objects (XSL-FO).
So the end result, because someone wrote this function years ago is that printf takes this thing, takes this thing, David plops David inside the middle of that formatted string and then renders the whole result.
基于这是某人多年以前写的程序,最终的结果是打印出这个,这个,在格式化字符串中间的,然后返回结果。
Glancing at the bottom, this is pretty arbitrary, but I chose to format my string as follows: % 1f so at the bottom here I'm printing out %.1f, which quick sanity check means print just one digit after the decimal place.
看下这个底部,这个是相当随意的,但我选择把我的字符串格式化成这样:,所以在这个底部我打印输出,提醒一下,这是一个只打印出,小数点后一位的方法。
> David: At some point in time, I'm going to have to have declared the variable as a float before I can then hand it to printf as the insertion value for that format strength.
>,大卫:在一个特定的时间,我将需要,声明float类型这样的变量,那样我就可以把它打印出来,像是格式化优点的插入值。
应用推荐