diff options
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java index 250daf7d..afc6b0db 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java @@ -263,10 +263,11 @@ public class SignaturePanel extends JPanel { this.currentImage = null;
return;
}
-
+
+ boolean isRotated = ((currentPage.getRotation()%180) == 90);
PDRectangle actualPageSize = currentPage.getBBox();
- this.pageWidth = actualPageSize.getWidth();
- this.pageHeight = actualPageSize.getHeight();
+ this.pageWidth = isRotated ? actualPageSize.getHeight() : actualPageSize.getWidth();
+ this.pageHeight = isRotated ? actualPageSize.getWidth() : actualPageSize.getHeight();
this.pageToImageScale = getToolkit().getScreenSize().height / this.pageHeight;
// get the new image
|