diff options
Diffstat (limited to 'pdf-as-lib/src/main/java')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java index e8d1f4c0..00e7e149 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java @@ -589,6 +589,15 @@ public class PDFAsVisualSignatureBuilder extends PDVisibleSigBuilder { float origWidth = (float) img.getWidth(); float origHeight = (float) img.getHeight(); + if (table.style != null) { + if (table.style.getImageScaleToFit() != null) { + iwidth = table.style.getImageScaleToFit() + .getWidth(); + iheight = table.style.getImageScaleToFit() + .getHeight(); + } + } + float wfactor = iwidth / origWidth; float hfactor = iheight / origHeight; float scaleFactor = wfactor; @@ -600,16 +609,7 @@ public class PDFAsVisualSignatureBuilder extends PDVisibleSigBuilder { .floor((double) (scaleFactor * origWidth)); iheight = (float) Math .floor((double) (scaleFactor * origHeight)); - - if (table.style != null) { - if (table.style.getImageScaleToFit() != null) { - iwidth = table.style.getImageScaleToFit() - .getWidth(); - iheight = table.style.getImageScaleToFit() - .getHeight(); - } - } - + logger.debug("Scaling image to: " + iwidth + " x " + iheight); |