在前一章中,我们研究了Java代码的不同片段。
在本章中,我们将对每个示例使用相同的代码段:
public void createPdf(String html, String dest) throws IOException {
HtmlConverter.convertToPdf(html, new FileOutputStream(dest));
}
我们不看Java代码的不同片段,而是看HTML和CSS的不同片段。
在示例C02E01_ NoCss.java中,我们使用诸如 [blockcode][/blockcode] 和 [blockcode][/blockcode] 的标记将样式定义为斜体和不同的字体大小,请参见 1_no_css.html:
Colossal
Colossal (2016)
Directed by Nacho Vigalondo
Gl
下一篇:java数据输入
相关内容