From 05faa870716b1ab0f6ff47e39809d3884c93ef0e Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Thu, 2 Jul 2015 14:12:26 +0200 Subject: [PATCH] =?UTF-8?q?Digit=C3=A1ln=C3=AD=20podpis=20se=20zobraz?= =?UTF-8?q?=C3=AD=20v=20PDF=20viditeln=C4=9B.=20Server=20p=C5=99ed=C3=A1?= =?UTF-8?q?=20podepisovac=C3=AD=20aplikaci=20ID=20fieldu,=20kde=20se=20pod?= =?UTF-8?q?pis=20zobraz=C3=AD.=20ID=20je=20zad=C3=A1no=20v=20reportu=20jak?= =?UTF-8?q?u=20parametr=20pole=20signature.=20refs=20#224?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../isspst/reporting/SignaturePdfHandler.java | 15 +++++++++++++-- .../WEB-INF/reports/tripRequirementApp.jasper | Bin 56485 -> 56130 bytes .../WEB-INF/reports/tripRequirementApp.jrxml | 13 +++++-------- src/main/webapp/WEB-INF/signer/PDFSigner.jar | Bin 4583244 -> 4583824 bytes .../webapp/WEB-INF/signer/PDFSignerWin.jar | Bin 4587878 -> 4588445 bytes 5 files changed, 18 insertions(+), 10 deletions(-) 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 a400206ed71ccdc951aa0b983f8d97e0242b0820..5b802eb333f5e0208b3c640481fe5a7eea25e33c 100644 GIT binary patch delta 4695 zcmeH~e^6A{701sxyGE14gQD?$wrj;qiPgwG-H8bHpZyJozP~xfXMc~Q+x|9fe;%xwGDF?F zmnU+c14O(MQlXBg3{!opwgj?%SnPDrcU3~~5p%O`~%xF}?KhWa^|l-LUw*~+uZ?3K?=C2Ki?P!Gve3SM4Zy3CeUWp~(|&XT3&nt4E# zohqqUN%;a>mEvWgL987UZQ)Ad1iRh6uj>1K1`eqtOJZ6o9M&j2CX7zj9tXQ0`f-PF zhuRi1+#Ry&NUukVG_yX;G*0VD(_g}H6sa#?UdeM*S#9PNBix9b(mm2}m=Dvlg#L%j zG*6hRZr4WeOjT3=kQ$ud>jCQw%}ZLKb(VHIcW>Oft9#???o;_shqlflU9p9H2SH<@S1ArT;A;PN!je^O1X27CgW`wt1Y8{R9r={dS%_i z$nBH7aP`5uY}alrBYkN0lab-|lablslablslaa@PJoIz)yl*Yl)@HSFeS;^XNh;rU zP|HXk_WQ}m@cPNf?C{CR?C{CRiOnofrv9ZZ>64H{A5>nQ;rn>L$93$?{o37u_XVvPRW9}7nHaO)h(eT*!?!0pp z%Z}z!rbj9rCHC*xDwdTv^!NCjgrvl7d%V^9d4KDJkLHY2lZJ-&y`NKgeqWB|1?qZx zWWYj>?@M3dmGJe}825zJ9|pKA7s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