Code: Select all
document.saveIncremental(output);
< /code>
und der zweite Weg: < /p>
ExternalSigningSupport externalSigning = doc.saveIncrementalForExternalSigning(fos);
// invoke external signature service
byte[] cmsSignature = sign(externalSigning.getContent());
if (isLateExternalSigning()) {
// this saves the file with a 0 signature
externalSigning.setSignature(new byte[0]);
// remember the offset (add 1 because of "