欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

itext生成word导航格标题

程序员文章站 2022-05-28 18:51:53
...
/* 设置标题1格式 */
RtfParagraphStyle rtfGsBt1 = RtfParagraphStyle.STYLE_HEADING_1;
rtfGsBt2.setFontName(bf);
rtfGsBt1.setStyle(Font.BOLD);
rtfGsBt1.setSize(18);
rtfGsBt1.setColor(new Color(9,22,68));

/* 设置标题2格式 */
RtfParagraphStyle rtfGsBt2 = RtfParagraphStyle.STYLE_HEADING_2;
rtfGsBt2.setFontName(bf);
rtfGsBt2.setStyle(Font.NORMAL);
rtfGsBt2.setSize(16);
rtfGsBt2.setColor(new Color(9,22,68));

 

Paragraph indexIndustryInfo = new Paragraph("一级标题",rtfGsBt1);

 

Paragraph indexIndustryInfo = new Paragraph("二级标题",rtfGsBt2);

相关标签: java itext 标题