diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-24 09:02:13 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-24 09:02:13 +0200 |
commit | aef27acb44b647983b153db4b4bf491acced4f08 (patch) | |
tree | 50f055b09947afe41f9ba72eaabaa5d00a2e4f4b /pdf-as-pdfbox/src/main/java/at/gv | |
parent | 1e0714c4d8d7dff82b3b97fdba48745f8f8e6514 (diff) | |
download | pdf-as-4-aef27acb44b647983b153db4b4bf491acced4f08.tar.gz pdf-as-4-aef27acb44b647983b153db4b4bf491acced4f08.tar.bz2 pdf-as-4-aef27acb44b647983b153db4b4bf491acced4f08.zip |
added Padding to image scaletofit
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at/gv')
-rw-r--r-- | pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFBoxTable.java | 8 |
1 files changed, 4 insertions, 4 deletions
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) { |