1 51 52 package com.lowagie.text.rtf.field; 53 54 import java.io.IOException ; 55 import java.io.OutputStream ; 56 57 import com.lowagie.text.Font; 58 import com.lowagie.text.rtf.document.RtfDocument; 59 60 68 public class RtfTotalPageNumber extends RtfField { 69 70 73 private static final byte[] ARABIC_TOTAL_PAGES = "NUMPAGES \\\\* Arabic".getBytes(); 74 75 78 public RtfTotalPageNumber() { 79 super(null); 80 } 81 82 87 public RtfTotalPageNumber(Font font) { 88 super(null, font); 89 } 90 91 96 public RtfTotalPageNumber(RtfDocument doc) { 97 super(doc); 98 } 99 100 106 public RtfTotalPageNumber(RtfDocument doc, Font font) { 107 super(doc, font); 108 } 109 110 117 protected byte[] writeFieldInstContent() throws IOException 118 { 119 return ARABIC_TOTAL_PAGES; 120 } 121 124 protected void writeFieldInstContent(OutputStream out) throws IOException 125 { 126 out.write(ARABIC_TOTAL_PAGES); 127 } 128 129 136 protected byte[] writeFieldResultContent() throws IOException 137 { 138 return "1".getBytes(); 139 } 140 141 144 protected void writeFieldResultContent(final OutputStream out) throws IOException 145 { 146 out.write("1".getBytes()); 147 } 148 149 } 150 | Popular Tags |