aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java
index 002e0678..a35269d2 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java
@@ -75,6 +75,14 @@ public class PlaceholderGeneratorServlet extends HttpServlet implements Placehol
if(id != null && !id.isEmpty()) {
id = id.replaceAll("[^0-9]", "");
if(id != null && !id.isEmpty()) {
+ try{
+ if(id.length()> 5)
+ id = id.substring(0,5);
+ int value = Integer.parseInt(id);
+ id = Integer.toString(value);//remove leading zeros
+ }catch(Exception e){
+
+ }
buildString = buildString + ";" + SignaturePlaceholderData.ID_KEY + "=" + id;
filename = filename + "_" + id;
}