diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:03:38 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:03:38 +0000 |
commit | ef5bf851189d4bfb630ab7c15aa9f8d1decf1967 (patch) | |
tree | d5cfdb89384fd922df07b4e765c8f1520cc737f7 /pdf-over-signer/pdf-over-sigpdfas/src/main/java | |
parent | f15550e22839d60619ef300d543aa68f6d533efa (diff) | |
download | pdf-over-ef5bf851189d4bfb630ab7c15aa9f8d1decf1967.tar.gz pdf-over-ef5bf851189d4bfb630ab7c15aa9f8d1decf1967.tar.bz2 pdf-over-ef5bf851189d4bfb630ab7c15aa9f8d1decf1967.zip |
whitespace
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@106 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.java | 78 |
1 files changed, 39 insertions, 39 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 ab44d1b4..8668a3f3 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 @@ -117,46 +117,46 @@ public class PdfAsSignatureParameter extends SignatureParameter { try { - PDFASHelper.getPdfAs(); - - SignatureObject sign_obj = at.knowcenter.wag.egov.egiz.PdfAS - .createSignatureObjectFromType(PDFASSigner.PROFILE_ID); - - sign_obj.fillValues(' ', true, false); - sign_obj.setKZ(BinarySignator_1_1_0.MY_ID); - - float width = getPlaceholderDimension().getWidth(); - float height = getPlaceholderDimension().getHeight(); - - Table table = sign_obj.getAbstractTable(); - - table.getStyle().getBgColor(); - - log.info(table.toString()); - - float[] heights = this.getTableHeights(table, table.getStyle(), height); - - log.info("Width: " + width + " Height: " + height); - BufferedImage image = new BufferedImage((int) width, (int) height, - BufferedImage.TYPE_INT_RGB); - Graphics graphic = image.getGraphics(); - - graphic.setColor(table.getStyle().getBgColor()); - graphic.fillRect(0, 0, (int) width, (int) height); - - graphic.setColor(Color.black); - graphic.drawRect(0, 0, (int) width, (int) height); - - this.drawTable(0, 0, (int) width, (int) height, table, - table.getStyle(), graphic, heights); - - save(image, "jpg"); - - return image; + PDFASHelper.getPdfAs(); + + SignatureObject sign_obj = at.knowcenter.wag.egov.egiz.PdfAS + .createSignatureObjectFromType(PDFASSigner.PROFILE_ID); + + sign_obj.fillValues(' ', true, false); + sign_obj.setKZ(BinarySignator_1_1_0.MY_ID); + + float width = getPlaceholderDimension().getWidth(); + float height = getPlaceholderDimension().getHeight(); + + Table table = sign_obj.getAbstractTable(); + + table.getStyle().getBgColor(); + + log.info(table.toString()); + + float[] heights = this.getTableHeights(table, table.getStyle(), height); + + log.info("Width: " + width + " Height: " + height); + BufferedImage image = new BufferedImage((int) width, (int) height, + BufferedImage.TYPE_INT_RGB); + Graphics graphic = image.getGraphics(); + + graphic.setColor(table.getStyle().getBgColor()); + graphic.fillRect(0, 0, (int) width, (int) height); + + graphic.setColor(Color.black); + graphic.drawRect(0, 0, (int) width, (int) height); + + this.drawTable(0, 0, (int) width, (int) height, table, + table.getStyle(), graphic, heights); + + save(image, "jpg"); + + return image; } - catch (Exception ex) { - log.error("Failed to create Placeholder!", ex); - throw new SignatureException(ex.getMessage()); + catch (Exception ex) { + log.error("Failed to create Placeholder!", ex); + throw new SignatureException(ex.getMessage()); } } |