diff --git a/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java b/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java index 2e38ece8..089fd3d6 100644 --- a/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java +++ b/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java @@ -28,9 +28,20 @@ public class SignaturePdfHandler implements GenericElementPdfHandler, GenericEle @Override public void exportElement(JRPdfExporterContext exporterContext, JRGenericPrintElement element) { PdfFormField field = PdfFormField.createSignature(exporterContext.getPdfWriter()); - field.setFieldName("signature"); + Object param = element.getParameterValue("index"); + String index = param != null ? String.valueOf(param) : null; + + if (index != null) { + field.setFieldName("signature-" + index); + } else { + field.setFieldName("signature"); + } + field.setFieldFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_LOCKED); - field.setWidget(new Rectangle(element.getX(), element.getY(), element.getX() + element.getWidth(), element.getY() + element.getHeight()), PdfName.HIGHLIGHT); + field.setWidget(new Rectangle(element.getX(), + exporterContext.getExportedReport().getPageHeight() - element.getY(), + element.getX() + element.getWidth(), + exporterContext.getExportedReport().getPageHeight() - element.getY() - element.getHeight()), PdfName.HIGHLIGHT); exporterContext.getPdfWriter().addAnnotation(field); } diff --git a/src/main/webapp/WEB-INF/reports/tripRequirementApp.jasper b/src/main/webapp/WEB-INF/reports/tripRequirementApp.jasper index a400206e..5b802eb3 100644 Binary files a/src/main/webapp/WEB-INF/reports/tripRequirementApp.jasper and b/src/main/webapp/WEB-INF/reports/tripRequirementApp.jasper differ diff --git a/src/main/webapp/WEB-INF/reports/tripRequirementApp.jrxml b/src/main/webapp/WEB-INF/reports/tripRequirementApp.jrxml index 6856b01f..1c0ced26 100644 --- a/src/main/webapp/WEB-INF/reports/tripRequirementApp.jrxml +++ b/src/main/webapp/WEB-INF/reports/tripRequirementApp.jrxml @@ -2,7 +2,7 @@ - +