From 0e78a06d28d4f8496d72574053ed60e7e8105488 Mon Sep 17 00:00:00 2001 From: ferbas Date: Thu, 10 Dec 2009 11:51:27 +0000 Subject: git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@503 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/knowcenter/wag/egov/egiz') 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(); -- cgit v1.2.3