设置双删除线
示例代码
package test.create.c01;
import iofd.layout.OfdDocument;
import iofd.layout.block.Paragraph;
import iofd.layout.block.paragraph.Text;
import test.create.TestDocUtil;
/**
* 设置双删除线示例
* */
public class C0115SetFontDoubleDeleteLine {
public static void main(String[] args) throws Throwable {
C0115SetFontDoubleDeleteLine o = new C0115SetFontDoubleDeleteLine();
o.done();
}
private void done() throws Throwable {
String clzName = this.getClass().getSimpleName();
System.out.println(clzName + " begin");
OfdDocument doc = new OfdDocument();
String s;
Paragraph p;
Text text;
s = "这是加双删除线的示例";
p = new Paragraph();
text = new Text(s);
text.setDoubleDeleteline(true);
p.add(text);
doc.add(p);
p = new Paragraph();
text = new Text(s);
text.setDoubleDeleteline(true);
text.setSize(24d);
p.add(text);
doc.add(p);
p = new Paragraph();
text = new Text(s);
text.setDoubleDeleteline(true);
text.setSize(36d);
p.add(text);
doc.add(p);
p = new Paragraph();
text = new Text(s);
/*
* 设置双删除线
* */
text.setDoubleDeleteline(true);
text.setSize(48d);
p.add(text);
doc.add(p);
String fileName = TestDocUtil.getOfdFilePath(this.getClass());
doc.save(fileName);
System.out.println(clzName + " end");
}
}