1 47 48 package com.lowagie.text.pdf; 49 50 54 public class PdfSignature extends PdfDictionary { 55 56 57 public PdfSignature(PdfName filter, PdfName subFilter) { 58 super(PdfName.SIG); 59 put(PdfName.FILTER, filter); 60 put(PdfName.SUBFILTER, subFilter); 61 } 62 63 public void setByteRange(int range[]) { 64 PdfArray array = new PdfArray(); 65 for (int k = 0; k < range.length; ++k) 66 array.add(new PdfNumber(range[k])); 67 put(PdfName.BYTERANGE, array); 68 } 69 70 public void setContents(byte contents[]) { 71 put(PdfName.CONTENTS, new PdfString(contents).setHexWriting(true)); 72 } 73 74 public void setCert(byte cert[]) { 75 put(PdfName.CERT, new PdfString(cert)); 76 } 77 78 public void setName(String name) { 79 put(PdfName.NAME, new PdfString(name, PdfObject.TEXT_UNICODE)); 80 } 81 82 public void setDate(PdfDate date) { 83 put(PdfName.M, date); 84 } 85 86 public void setLocation(String name) { 87 put(PdfName.LOCATION, new PdfString(name, PdfObject.TEXT_UNICODE)); 88 } 89 90 public void setReason(String name) { 91 put(PdfName.REASON, new PdfString(name, PdfObject.TEXT_UNICODE)); 92 } 93 94 public void setContact(String name) { 95 put(PdfName.CONTACTINFO, new PdfString(name, PdfObject.TEXT_UNICODE)); 96 } 97 } | Popular Tags |