【问题标题】:how to set header font color in iText如何在 iText 中设置标题字体颜色
【发布时间】:2010-08-11 17:09:17
【问题描述】:
HeaderFooter header = 
      new HeaderFooter(new Phrase("test", new Font(bf_times)), false);
header.setAlignment(Element.ALIGN_CENTER);
header.setBackgroundColor(new Color(0xB5091E));

document.setHeader(header);

我想将test 的字体颜色设置为白色 (FFFFFF)

【问题讨论】:

    标签: itext


    【解决方案1】:

    Font 是保存颜色的类。

    Font font = new Font(bf_times)
    font.setColor(Color.WHITE);
    

    应该这样做。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-21
      • 2020-01-01
      • 2014-04-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多