diff options
author | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-01 08:30:45 +0000 |
---|---|---|
committer | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-01 08:30:45 +0000 |
commit | 89ac04963c6781065a5342e219396bbd73bdf6e9 (patch) | |
tree | 013915f36c1ffe9a88e98f28f0592949df1530fb /trunk/pdf-over-signer | |
parent | fb9c33ffd611c145d605ae770181e576a5b9e681 (diff) | |
download | pdf-over-89ac04963c6781065a5342e219396bbd73bdf6e9.tar.gz pdf-over-89ac04963c6781065a5342e219396bbd73bdf6e9.tar.bz2 pdf-over-89ac04963c6781065a5342e219396bbd73bdf6e9.zip |
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
Diffstat (limited to 'trunk/pdf-over-signer')
-rw-r--r-- | trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java | 23 |
1 files changed, 17 insertions, 6 deletions
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; } /** |