int contentSize = 0x2502;
HashMap<PdfName, Integer> exc = new HashMap<PdfName, Integer>();
exc.put(PdfName.CONTENTS, new Integer(contentSize));
appearance.preClose(exc);
Digester digester = new BasicDigester(digestType);
byte[] rangeStream = IOUtils.toByteArray(appearance.getRangeStream());
byte[] hash = digester.digest(rangeStream);
TSAClient tsc = null;
if (this.parameters.getTimeStampClient() != null) {
tsc = new DelegateITextTSAClient(this.parameters.getTimeStampClient());
}