From 554e95b4c25f91390df65870d11ff5fe325df9fe Mon Sep 17 00:00:00 2001 From: wprinz Date: Fri, 30 May 2008 09:59:11 +0000 Subject: CR Unsichtbare Felder git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@268 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../wag/egov/egiz/pdf/PDFSignatureObjectIText.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/main') 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; -- cgit v1.2.3