aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwprinz <wprinz@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-05-30 09:59:11 +0000
committerwprinz <wprinz@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-05-30 09:59:11 +0000
commit554e95b4c25f91390df65870d11ff5fe325df9fe (patch)
tree43dd92592d6ef6c375700d37d0129fa54e84ad0a /src
parentd99d3cb814c9091fce344b3ffa149c151b542e28 (diff)
downloadpdf-as-3-554e95b4c25f91390df65870d11ff5fe325df9fe.tar.gz
pdf-as-3-554e95b4c25f91390df65870d11ff5fe325df9fe.tar.bz2
pdf-as-3-554e95b4c25f91390df65870d11ff5fe325df9fe.zip
CR Unsichtbare Felder
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@268 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
index 0ad8583..c03db24 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
@@ -309,8 +309,16 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
throw new PDFDocumentException(220, "Image file \"" + img_file.getCanonicalPath() + "\" doesn't exist.");
}
Image image = Image.getInstance(img_file.getCanonicalPath());
+ image.scaleToFit(80.0f, 80.0f);
// tknall end
- pdf_cell = new PdfPCell(image, true);
+ boolean fit = true;
+ Style.ImageScaleToFit istf = cell_style.getImageScaleToFit();
+ if (istf != null)
+ {
+ image.scaleToFit(istf.getWidth(), istf.getHeight());
+ fit = false;
+ }
+ pdf_cell = new PdfPCell(image, fit);
setCellStyle(pdf_cell, cell_style);
}
catch (BadElementException e)
@@ -363,6 +371,11 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
table.setStyle(inherit_style);
PdfPTable pdf_table = renderTable(table);
pdf_cell = new PdfPCell(pdf_table);
+ // The default new PdfPCell has a default border of 15.
+ // For blocks without border and subtables this results
+ // in a border to be drawn around the cell.
+ // ==> no border on default
+ pdf_cell.setBorder(0);
break;
}
return pdf_cell;