summaryrefslogtreecommitdiff
path: root/pdf-over-signer/pdf-over-sigpdfas/src/main/java
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:58:27 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:58:27 +0000
commit96a1a5c9d04238c63247794ad9c76e5a2001b8d0 (patch)
treec0b05f0378e84e53a73cdfb62612a7d3e6ecb40a /pdf-over-signer/pdf-over-sigpdfas/src/main/java
parentb8b015d3fa3b58cb5e70b4cd2ad1b8fe2a424af9 (diff)
downloadpdf-over-96a1a5c9d04238c63247794ad9c76e5a2001b8d0.tar.gz
pdf-over-96a1a5c9d04238c63247794ad9c76e5a2001b8d0.tar.bz2
pdf-over-96a1a5c9d04238c63247794ad9c76e5a2001b8d0.zip
Moved Mobile BKU URL to configuration file
Extracted localizable Strings git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@61 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-signer/pdf-over-sigpdfas/src/main/java')
-rw-r--r--pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java
index 5b15543e..fa1572e9 100644
--- a/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java
+++ b/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;
}
/**