diff --git a/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java b/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java index 089fd3d6..271150df 100644 --- a/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java +++ b/src/main/java/info/bukova/isspst/reporting/SignaturePdfHandler.java @@ -1,7 +1,6 @@ package info.bukova.isspst.reporting; import com.lowagie.text.Rectangle; -import com.lowagie.text.pdf.PdfAnnotation; import com.lowagie.text.pdf.PdfFormField; import com.lowagie.text.pdf.PdfName; import net.sf.jasperreports.engine.JRGenericPrintElement; @@ -27,7 +26,8 @@ public class SignaturePdfHandler implements GenericElementPdfHandler, GenericEle @Override public void exportElement(JRPdfExporterContext exporterContext, JRGenericPrintElement element) { - PdfFormField field = PdfFormField.createSignature(exporterContext.getPdfWriter()); + //PdfFormField field = PdfFormField.createSignature(exporterContext.getPdfWriter()); + PdfFormField field = PdfFormField.createTextField(exporterContext.getPdfWriter(), true, false, 255); Object param = element.getParameterValue("index"); String index = param != null ? String.valueOf(param) : null; @@ -37,7 +37,9 @@ public class SignaturePdfHandler implements GenericElementPdfHandler, GenericEle field.setFieldName("signature"); } - field.setFieldFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_LOCKED); + field.put(PdfName.V, exporterContext.getPdfWriter().getPdfIndirectReference()); + field.setFieldFlags(PdfFormField.FF_READ_ONLY); + field.setWidget(new Rectangle(element.getX(), exporterContext.getExportedReport().getPageHeight() - element.getY(), element.getX() + element.getWidth(), diff --git a/src/main/webapp/WEB-INF/signer/PDFSigner.jar b/src/main/webapp/WEB-INF/signer/PDFSigner.jar index 1b6cf795..6259e887 100644 Binary files a/src/main/webapp/WEB-INF/signer/PDFSigner.jar and b/src/main/webapp/WEB-INF/signer/PDFSigner.jar differ diff --git a/src/main/webapp/WEB-INF/signer/PDFSignerWin.jar b/src/main/webapp/WEB-INF/signer/PDFSignerWin.jar index 651ef4ea..6259e887 100644 Binary files a/src/main/webapp/WEB-INF/signer/PDFSignerWin.jar and b/src/main/webapp/WEB-INF/signer/PDFSignerWin.jar differ