Пример #1
0
 public void drawHeaders(PdfContentByte dc, Document document, BaseFont baseFont, int pageNo) {
   final String pageNoStr = String.valueOf(pageNo);
   for (Entry<HeaderPosition, HeaderStyle> entry : this.headers.entrySet()) {
     HeaderPosition position = entry.getKey();
     HeaderStyle style = entry.getValue();
     if (position.isHeader()) {
       style.draw(position, dc, document, baseFont, pageNoStr, this.headerExtra);
     } else {
       style.draw(position, dc, document, baseFont, pageNoStr, this.footerExtra);
     }
   }
 }
Пример #2
0
 public void drawHeaderTemplates(PdfWriter writer, BaseFont baseFont, int totalPage) {
   for (Entry<HeaderPosition, HeaderStyle> entry : this.headers.entrySet()) {
     HeaderStyle style = entry.getValue();
     style.drawTemplate(writer, baseFont, String.valueOf(totalPage));
   }
 }