summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index c9e14898..8eb31752 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -182,11 +182,14 @@ public class PositioningComposite extends StateComposite {
this.pdf = new PDFFile(buf);
}
catch (PDFAuthenticationFailureException e) {
- throw new IOException(Messages.getString("error.PDFProtected"), e); //$NON-NLS-1$
+ throw new IOException(Messages.getString("error.PDFPwdProtected"), e); //$NON-NLS-1$
}
catch (IOException e) {
throw new IOException(Messages.getString("error.MayNotBeAPDF"), e); //$NON-NLS-1$
}
+ if (this.pdf.getDefaultDecrypter().isEncryptionPresent())
+ throw new IOException(Messages.getString("error.PDFProtected")); //$NON-NLS-1$
+
if (this.viewer == null) {
this.viewer = new SignaturePanel(this.pdf);
this.frame.add(this.viewer, BorderLayout.CENTER);