From 89ac04963c6781065a5342e219396bbd73bdf6e9 Mon Sep 17 00:00:00 2001 From: tkellner Date: Mon, 1 Oct 2012 08:30:45 +0000 Subject: Moved Mobile BKU URL to configuration file Extracted localizable Strings git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12542 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../signer/pdfas/PdfAsSignatureParameter.java | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'trunk/pdf-over-signer') diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java index 5b15543e..fa1572e9 100644 --- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java +++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java @@ -17,12 +17,13 @@ package at.asit.pdfover.signer.pdfas; //Imports import java.util.HashMap; -import java.util.Properties; import at.asit.pdfover.signator.SignatureDimension; import at.asit.pdfover.signator.SignatureParameter; +import at.asit.pdfover.signator.SignaturePosition; import at.gv.egiz.pdfas.api.io.DataSource; import at.gv.egiz.pdfas.api.sign.pos.SignaturePositioning; +import at.knowcenter.wag.egov.egiz.exceptions.PDFDocumentException; /** * Implementation of SignatureParameter specific for PDF - AS Library @@ -33,17 +34,27 @@ public class PdfAsSignatureParameter extends SignatureParameter { @Override public SignatureDimension getPlaceholderDimension() { - // TODO Auto-generated method stub - return null; + return new SignatureDimension(487, 206); } /** * Gets the PDFAS Positioning * @return SignaturePositioning + * @throws PDFDocumentException */ - public SignaturePositioning getPDFASPositioning() { - // TODO: implement Signature creation - return new SignaturePositioning(); + public SignaturePositioning getPDFASPositioning() throws PDFDocumentException { + SignaturePosition position = this.getSignaturePosition(); + position.useAutoPositioning(); + + SignaturePositioning positioning = null; + if(!position.useAutoPositioning()) { + positioning = new SignaturePositioning(String.format("p:%d;x:%f;y:%f", + position.getPage(), position.getX(), position.getY())); + } else { + positioning = new SignaturePositioning(); + } + + return positioning; } /** -- cgit v1.2.3