From aef27acb44b647983b153db4b4bf491acced4f08 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 24 Oct 2014 09:02:13 +0200 Subject: added Padding to image scaletofit --- .../at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFBoxTable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pdf-as-pdfbox/src/main/java/at/gv/egiz') diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFBoxTable.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFBoxTable.java index e84bd498..f83d099a 100644 --- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFBoxTable.java +++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFBoxTable.java @@ -528,10 +528,10 @@ public class PDFBoxTable { case Entry.TYPE_IMAGE: if (style != null && style.getImageScaleToFit() != null) { //if (style.getImageScaleToFit().getHeight() < width) { - return style.getImageScaleToFit().getHeight(); + return style.getImageScaleToFit().getHeight() + padding * 2; //} } - return width; + return width + padding * 2; case Entry.TYPE_TABLE: PDFBoxTable pdfBoxTable = null; if (cell.getValue() instanceof Table) { @@ -580,9 +580,9 @@ public class PDFBoxTable { } case Entry.TYPE_IMAGE: if (style != null && style.getImageScaleToFit() != null) { - return style.getImageScaleToFit().getHeight(); + return style.getImageScaleToFit().getHeight() + padding * 2; } - return 80.f; + return 80.f + padding * 2; case Entry.TYPE_TABLE: PDFBoxTable pdfBoxTable = null; if (cell.getValue() instanceof Table) { -- cgit v1.2.3