summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-signer
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:37 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:37 +0000
commit8f2af4444822927a20dadcf902920f24e9100d5f (patch)
treeaae9623c345195940bddd23e577159f06e7a09e5 /trunk/pdf-over-signer
parent7ef866788508618ef3a60a366e629f599f744367 (diff)
downloadpdf-over-8f2af4444822927a20dadcf902920f24e9100d5f.tar.gz
pdf-over-8f2af4444822927a20dadcf902920f24e9100d5f.tar.bz2
pdf-over-8f2af4444822927a20dadcf902920f24e9100d5f.zip
+ changed to small signature block
+ fixed placeholder dimension to paper coordinates of placeholder git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12698 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/PDFASSigner.java2
-rw-r--r--trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PdfAsSignatureParameter.java21
2 files changed, 16 insertions, 7 deletions
diff --git a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java
index 516a54ad..81302bf2 100644
--- a/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java
+++ b/trunk/pdf-over-signer/pdf-over-sigpdfas/src/main/java/at/asit/pdfover/signer/pdfas/PDFASSigner.java
@@ -36,7 +36,7 @@ public class PDFASSigner implements Signer {
/**
* The profile ID
*/
- protected static final String PROFILE_ID = "SIGNATURBLOCK_DE";
+ protected static final String PROFILE_ID = "SIGNATURBLOCK_SMALL_DE";
/**
* The template URL
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 3879c434..39c64371 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
@@ -60,7 +60,7 @@ public class PdfAsSignatureParameter extends SignatureParameter {
public SignatureDimension getPlaceholderDimension() {
// return new SignatureDimension(487, 206);
- return new SignatureDimension(976, 329);
+ return new SignatureDimension(262, 88);
}
/**
@@ -76,9 +76,15 @@ public class PdfAsSignatureParameter extends SignatureParameter {
SignaturePositioning positioning = null;
if (!position.useAutoPositioning()) {
- positioning = new SignaturePositioning(String.format(
- "p:%d;x:%f;y:%f", position.getPage(), position.getX(),
- position.getY()));
+ if (position.getPage() < 1) {
+ positioning = new SignaturePositioning(String.format(
+ "p:new;x:%f;y:%f;w:262", position.getX(),
+ position.getY()));
+ } else {
+ positioning = new SignaturePositioning(String.format(
+ "p:%d;x:%f;y:%f;w:262", position.getPage(), position.getX(),
+ position.getY()));
+ }
} else {
positioning = new SignaturePositioning();
}
@@ -149,7 +155,7 @@ public class PdfAsSignatureParameter extends SignatureParameter {
this.drawTable(0, 0, (int) width, (int) height, table,
table.getStyle(), graphic, heights);
- //save(image, "png");
+ // save(image, "png");
return image;
} catch (Exception ex) {
@@ -157,13 +163,16 @@ public class PdfAsSignatureParameter extends SignatureParameter {
return ImageIO.read(PdfAsSignatureParameter.class
.getResourceAsStream("/img/fallbackPlaceholder.png"));
} catch (IOException e) {
- return new BufferedImage(getPlaceholderDimension().getWidth(), getPlaceholderDimension().getHeight(), BufferedImage.TYPE_INT_RGB);
+ return new BufferedImage(getPlaceholderDimension().getWidth(),
+ getPlaceholderDimension().getHeight(),
+ BufferedImage.TYPE_INT_RGB);
}
}
}
/**
* used for debugging ..
+ *
* @param image
* @param ext
*/