diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java | 15 |
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;
|