aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java
index a391c15..6a7c545 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java
@@ -60,8 +60,10 @@ public class AdobeSignatureHelper {
String fieldName = getAdobeFieldName(so.getSignatureTypeDefinition().getType());
// find field num
int nexSigNum = 1;
- while (stamper.getAcroFields().getField(fieldName + nexSigNum) != null) {
+ String finalFieldName = fieldName + " #" + nexSigNum;
+ while (stamper.getAcroFields().getField(finalFieldName) != null) {
nexSigNum++;
+ finalFieldName = fieldName + " #" + nexSigNum;
}
sap.setCrypto(null, null, null, null);
@@ -72,7 +74,7 @@ public class AdobeSignatureHelper {
// the following line marks the sig block as adobe sig
// sap.setVisibleSignature(createRectangleFromTablePos(iui.actualTablePos),
// iui.actualTablePos.page, "PDF-AS-Signatur");
- sap.setVisibleSignature(new Rectangle(0, 0, 0, 0), atp.page, fieldName + " #" + nexSigNum);
+ sap.setVisibleSignature(new Rectangle(0, 0, 0, 0), atp.page, finalFieldName);
String subfilter = "unknown";
if (so != null && so.getKZ() != null) {
subfilter = so.getKZ().toString();